Python2.6 + win32com crashes with unicode bug

John Machin sjmachin at lexicon.net
Fri Oct 30 01:52:22 CET 2009


On Oct 30, 11:11 am, Terry Reedy <tjre... at udel.edu> wrote:
> GerritM wrote:
[snip]
> >   File "C:\Python26\lib\site-packages\win32com\client\build.py", line
> > 542, in <lambda>
> >     return filter( lambda char: char in valid_identifier_chars, className)
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 52:
> > ordinal not in range(128)
>
> I suspect that 2.6 fixed the bug of allowing non-ascii chars when using
> the ascii codec.  I would check to see if there is an 0x83 in
> D:/temp/test.vsd

  Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
  Type "help", "copyright", "credits" or "license" for more
information.
  >>> '\x83'.decode('ascii')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in
position 0: ordinal not in range(128)
  >>>

What bug??



More information about the Python-list mailing list