weird filenames on windows

Matt Mackall mpm at selenic.com
Wed Jan 16 17:48:52 UTC 2008


On Wed, 2008-01-16 at 09:17 +0200, Alexander Belchenko wrote:
> -----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.

You'll have to explain why simply passing through data unmodified
creates a problem, because it's a mystery to me. If a directory listing
contains bytecode <x> and I ask to open a file with bytecode <x>, it
should work. And indeed it does for most people (in particular, people
using the prebuilt binaries).

It's in fact much more likely that j w's problem is caused by something
in his setup (probably GnuWin32) attempting to interpret filenames as
unicode strings and not doing it consistently. But it won't be
Mercurial, because Mercurial knows better than to even try.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list