Consequences for use of hg for other applications than SCM was Re: German umlauts in file names

Adrian Buehlmann adrian at cadifra.com
Tue Jul 1 07:36:59 CDT 2008


On 01.07.2008 14:05, Alexander Belchenko wrote:
> Matt Mackall пишет:
>> On Sat, 2008-06-21 at 00:54 +0200, Marko Käning wrote:
>>> So, then the next question. How do I teach mercurial to use UTF-8 under Windows?
>> First you have to set your system to operate in UTF-8 mode. I believe
>> that's known as CP65001.
>>
> 
> CP65001 cannot be used as alias to UTF-8 at least on Windows 2000 + Python 2.5:
> 
> C:\>chcp 65001
> 
> C:\>chcp
> Текущая кодовая страница: 65001
> 
> C:\>python -c "import sys; print sys.stdout.encoding"
> cp65001
> 
> C:\>python -c "print u''.encode('cp65001')"
> Traceback (most recent call last):
>    File "<string>", line 1, in <module>
> LookupError: unknown encoding: cp65001
> 
> C:\>python -c "import sys; print sys.getfilesystemencoding()"
> mbcs
> 

(No intention to respond to this currently.)

I'm just reporting the output of above steps done on Windows XP SP3
for reference:

> chcp
Active code page: 437

> chcp 65001
Active code page: 65001

> python -V
Python 2.5.1

> python -c "import sys; print sys.stdout.encoding"
cp65001

> python -c "print u''.encode('cp65001')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
LookupError: unknown encoding: cp65001

> python -c "import sys; print sys.getfilesystemencoding()"
mbcs


See also http://docs.python.org/lib/standard-encodings.html
(which is for Python 2.5.2 as I write this)



More information about the Mercurial mailing list