This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sjmachin
Recipients sjmachin, tarek
Date 2008-12-30.12:20:28
SpamBayes Score 4.22677e-08
Marked as misclassified No
Message-id <>
(1) I am not very concerned about chars like \x9d which are not valid in
the declared encoding; I am more concerned with chars like \x93 and \x94
which *ARE* valid in the declared encoding. Please ensure that these
cases are included in tests.
(2) Please check your test data and test results. I get different
results. I have created a file by making the minimal changes to For me, this blows up on bytecompiling with *both* 3.0
(UnicodeDecodeError, as expected) and 2.x (Syntax Error unknown encoding
cp1252, wrong message) -- see below.

byte-compiling C:\python30\Lib\site-packages\ to x9d.pyc
Traceback (most recent call last):
  File "", line 5, in <module>
    py_modules = ["foo3", "bar3", "x93", "x94", "x9d", "xa0b7"]
  File "C:\python30\lib\distutils\", line 149, in setup
  File "C:\python30\lib\distutils\", line 942, in run_commands
  File "C:\python30\lib\distutils\", line 962, in run_command
  File "C:\python30\lib\distutils\command\", line 571, in run
  File "C:\python30\lib\distutils\", line 317, in run_command
  File "C:\python30\lib\distutils\", line 962, in run_command
  File "C:\python30\lib\distutils\command\", line 91, in run
  File "C:\python30\lib\distutils\command\", line 125, in
  File "C:\python30\lib\distutils\", line 520, in byte_compile
    compile(file, cfile, dfile)
  File "C:\python30\lib\", line 137, in compile
    codestring =
  File "C:\python30\lib\", line 1724, in read
    decoder.decode(, final=True))
  File "C:\python30\lib\", line 1295, in decode
    output = self.decoder.decode(input, final=final)
  File "C:\python30\lib\encodings\", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position
64: character maps to <undefined>

byte-compiling C:\python26\Lib\site-packages\ to x9d.pyc
SyntaxError: ('unknown encoding: cp1252',
('C:\\python26\\Lib\\site-packages\\', 0, 0, None))

byte-compiling c:\python25\Lib\site-packages\ to x9d.pyc
  File "c:\python25\Lib\site-packages\", line 0
SyntaxError: ('unknown encoding: cp1252',
('c:\\python25\\Lib\\site-packages\\', 0, 0, None))
Date User Action Args
2008-12-30 12:20:30sjmachinsetrecipients: + sjmachin, tarek
2008-12-30 12:20:30sjmachinsetmessageid: <>
2008-12-30 12:20:30sjmachinlinkissue4742 messages
2008-12-30 12:20:28sjmachincreate