weird filenames on windows
Alexander Belchenko
bialix at ukr.net
Wed Jan 16 01:17:50 CST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
j w пишет:
| On Jan 15, 2008 10:09 AM, Matt Mackall <mpm at selenic.com> wrote:
|>> Currently, if I try to add that directory, it cuts out with:
|>> abort: The system cannot find the file specified: mydir\Bilgisayar
|>> ve İletişim
|> That's quite mysterious. We got the filename from the operating system
|> and then handed it back exactly as we received it. What encoding are you
|> using? Can you tell us what the exact bytestring of that filename is?
|>
|
| Ok, I looked at this some more.
| It may not be a mercurial problem per se, since it affects other tools
| (well, at least GnuWin32 tools)
| It looks like just a codepage issue.
I'm sure this "issue" is directly related to unix nature of these tools and therefore to the habit
of looking at filesystem names as bytestrings. It's OK on Linux, but *completely* wrong on Windows,
where all filenames should be interpreted as unicode strings. So both gnuwin32 ported tools and hg
as well (because hg is *nix-style tool in first place) failed because they don't use *real* unicode
names.
| First, my original email was wrong - the abort: ... message does not
| have the special characters in it.
| The output reads: "Bilgisayar ve Iletisim" (no special characters)
| Thought I had copy-pasted, but I guess not...
|
| the output of chcp is: Active code page: 437
| Which is the DOS codepage
| This is WinXP pro with Mercurial version 04c76f296ad6
|
| For these tests, I just used the file named 'İletişim.txt' for simplicity.
|
| If I use the GnuWin32 mv command to move the file, I get:
| mv: cannot stat `subdir\\Iletisim.txt': No such file or directory
|
| However, if I use the windows "move" command, it succeeds.
|
| If I set my code page to 857 (Turkish), then the file shows up with
| funny characters in the console, and all the commands work.
| It shows up as ÿletiƒim.txt
Click on console icon and choose Properties. Then go to Font tab and change your font to Lucida
Console. It's a unicode font and it will shows all your characters *right*.
|
| So it looks like I just need to munge my codepage to make it work. Odd
| that the built-in windows commands are able to deal with it though.
| Wouldn't be the first time some weird hack was put in to make things
| "seem" correct, though...
|
| -John
|
| _______________________________________________
| Mercurial mailing list
| Mercurial at selenic.com
| http://selenic.com/mailman/listinfo/mercurial
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHja+ezYr338mxwCURAi5CAJ0UI34hlPABBdnTqHwjx7oxl0TXEwCeM0Rl
fKx4jRJbc4/LpMVHzDC2HFs=
=7qxE
-----END PGP SIGNATURE-----
More information about the Mercurial
mailing list