Can't add any non-ascii files on mercurial for Windows?

Nathan Davis davisnw at yahoo.com
Wed Sep 26 03:15:04 UTC 2012


And just for the fun of it, I tried manually hacking together a patch file as follows (utf-8 encoded, no BOM), which did manage to import into the repository, but showed up as a gibberish filename.

# HG changeset patch
# User Nathan at mom
# Date 1348628247 21600
# Node ID 99ec6d20ad74a7e35544bad9a871795fa9a2829d
# Parent  a54419021294bda76fc4814835a011efe83a04cf
blah

diff -r a54419021294 -r 99ec6d20ad74 你好吗.txt
--- /dev/null    Thu Jan 01 00:00:00 1970 +0000
+++ b/你好吗.txt    Tue Sep 25 20:57:27 2012 -0600
@@ -0,0 +1,1 @@
+howdy
\ No newline at end of file




________________________________
 From: Nathan Davis <davisnw at yahoo.com>
To: Matt Mackall <mpm at selenic.com>; Tony Mechelynck <antoine.mechelynck at gmail.com> 
Cc: "mercurial at selenic.com" <mercurial at selenic.com> 
Sent: Tuesday, September 25, 2012 8:09 PM
Subject: Re: Can't add any non-ascii files on mercurial for Windows?
 

10646 seems to be an invalid code page (at least chcp doesn't recognize it)


Also, I tried changing 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP 
from its current value of 1252 to 65001.  Doing so made the system 
unable to boot.

You said that cp65001, can be mostly made to work, but I have not had success with it.  Can you elaborate?


________________________________
 From: Matt Mackall <mpm at selenic.com>
To: Tony Mechelynck <antoine.mechelynck at gmail.com> 
Cc: Nathan Davis <davisnw at yahoo.com>; "mercurial at selenic.com" <mercurial at selenic.com> 
Sent: Tuesday, September 25, 2012 10:19 AM
Subject: Re: Can't add any non-ascii files on mercurial for Windows?
 
On Tue, 2012-09-25 at 16:11 +0200, Tony Mechelynck wrote:
> On 25/09/12 04:09, Nathan Davis wrote:
> > Thanks for your reply.
> >
> > My default Codepage is 437
> > (|HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP)|,
> > but I also (on the command line via chcp) experimented with a few other
> > code pages (50227, 50229, 65001) which didn't change the behavior any.
> >
> > So, it sounds like, at least for now, I am out of luck.
> [...]
> 
> Try 10646. IIRC that's the Windows codepage for Unicode (not sure if 
> it's
 UTF-8 or UTF-16le, and the name comes from ISO/IEC 10646 which is 
> also Unicode, but from the ISO point of view).

That'd be cp65001, which can be mostly made to work.

Also note that Mercurial ignores the _OEM_ code page (typically used by
console apps) and only looks at the _ANSI_ code page (typically used by
GUI apps and filesystem APIs).

-- 
Mathematics is the supreme nostalgia of our time.





_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120925/c1ed8717/attachment-0002.html>


More information about the Mercurial mailing list