A proposal on solve encoding problem on Windows.
Mike Meyer
mwm at mired.org
Fri Oct 21 16:46:43 UTC 2011
On Fri, Oct 21, 2011 at 9:35 AM, 罗勇刚(Yonggang Luo)
<luoyonggang at gmail.com> wrote:
> 2011/10/22 Mike Meyer <mwm at mired.org>:
>> On Fri, Oct 21, 2011 at 9:19 AM, 罗勇刚(Yonggang Luo)
>> <luoyonggang at gmail.com> wrote:
>>>
>>> 2011/10/22 Mike Meyer <mwm at mired.org>:
>>> > On Fri, Oct 21, 2011 at 1:37 AM, Andrey <py4fun at gmail.com> wrote:
>>> >>> So what happens when I create and check in a file that uses a
>>> >>> non-ascii
>>> >>> file name encoded in something other than utf8 on a Unix box and you
>>> >>> try and
>>> >>> check it out on your windows box?
>>> Which question? do you means
>>> So what happens when I create and check in a file that uses a non-ascii
>>> file name encoded in something other than utf8 on a Unix box and you try
>>> and
>>> check it out on your windows box?
>>
>> Yes, that's the question.
>>
>>> If is this question, then the answer is:
>>> refer to http://mercurial.selenic.com/wiki/UnicodeOnWindows
>>> 1, first, you know which encoding you used under Unix box. suppose the
>>> encoding is cp936.
>>> 2. On windows, execute the command
>>> hg encoding upgrade --old cp936 --new cp936
>>> Then you will working fine with it on window
>>
>> From reading the wiki, upgrade is for upgrading an *old* repository
>> from whatever it's encoding is (which of course wrongly assumes that
>> all the files in an old repository have the same encoding). I'm not
>> asking about that case, I'm asking about the case where a *new*
>> repository is used on a system that is not Windows and not utf8 which,
>> according to the wiki page, "won't be affected".
> Of cause, it's not affected, you can still using new Mercurial in the old
> way on windows. when creating new repository.
I'm sorry, but I don't see how this answers the question. Could you
provide details? Or maybe I should. Here's the scenario:
- I create a new repository on Windows, and start checking in files.
- I clone it to a Unix system, and check in files with non-utf8,
non-ascii file names.
- I pull changes back to the Unix system and update.
So - what becomes of those non-utf8, non-ascii file names on my Windows box?
> Notes
>
> 1. Evertying happened under windows.
No, it doesn't. That's part of the problem. Mercurial is a
cross-platform tool with unix leanings. Any change has to both not
break things on Unix, *and* not break things for people who are using
it on both Windows and Unix.
<mike
More information about the Mercurial
mailing list