[issue13216] Add cp65001 codec

2011-10-26 Thread STINNER Victor
STINNER Victor added the comment: Lib/encodings/cp65001.py uses a little trick to mark the codec as specific to Windows: - if not hasattr(codecs, 'code_page_encode'): raise LookupError("cp65001 encoding is only available on Windows") - -- __

[issue13216] Add cp65001 codec

2011-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2cad20e2e588 by Victor Stinner in branch 'default': Close #13247: Add cp65001 codec, the Windows UTF-8 (CP_UTF8) http://hg.python.org/cpython/rev/2cad20e2e588 -- resolution: -> fixed status: open -> closed ___

[issue13216] Add cp65001 codec

2011-10-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0eac706d82d1 by Victor Stinner in branch 'default': Fix the issue number of my cp65001 commit: 13247 => issue #13216 http://hg.python.org/cpython/rev/0eac706d82d1 -- nosy: +python-dev ___ Python tracker

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > > Sorry, which bug? > #6501 and friends Hum, this particular issue, #6501, doesn't concern the code page 65001. The typical usecase (issues #7441 and #10920) is: C:\victor\cpython>chcp 65001 Page de codes active : 65001 C:\victor\cpython>pcbui

[issue13216] Add cp65001 codec

2011-10-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> As for the 65001 bug: is that actually solved by this codec? > > Sorry, which bug? #6501 and friends (isn't it interesting that the issue of code page 65001 is reported as bug 6501?) -- ___ Python tracker

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > I consider that it is useless to set the ANSI code page to 65001 in a console I did more tests on the Windows console, focused on output, see: http://bugs.python.org/issue1602#msg145898 I was wrong, it *is* useful to change the code page to 65001. Even if we

[issue13216] Add cp65001 codec

2011-10-19 Thread STINNER Victor
STINNER Victor added the comment: > We shouldn't use the MS codec if we have our own, as they may differ. Ok, I agree. MS codec has a nice replacement behaviour (search for a similar glyph): cp1252 encodes Ł to b'L' for example. Our codec raises a UnicodeEncodeError on u'\u0141'.encode('cp125

[issue13216] Add cp65001 codec

2011-10-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: We shouldn't use the MS codec if we have our own, as they may differ. As for the 65001 bug: is that actually solved by this codec? -- ___ Python tracker

[issue13216] Add cp65001 codec

2011-10-18 Thread STINNER Victor
STINNER Victor added the comment: > Users want the code page 65001 See issues #6058, #7441 and #10920. -- ___ Python tracker ___ ___

[issue13216] Add cp65001 codec

2011-10-18 Thread STINNER Victor
New submission from STINNER Victor : Thanks to #12281, it is now trivial to implement any Windows code page in Python. I don't know if existing code pages (e.g. cp932) should use codecs.code_page_encode/.code_page_decode on Windows, or continue to use the (portable) Python code. Users want th