[python-win32] com_error Unicode problems
Tim Golden
mail at timgolden.me.uk
Wed Jul 23 12:40:08 CEST 2008
niki wrote:
> Tim Golden wrote:
>> The OP is running on a Simple Chinese edition of Windows XP,
>> and the error message, naturally, returns Simple Chinese
>> characters. But... it's apparent that the com_error info
>> structure returns not Unicode but byte stream. I *think*
>> I can decode into Unicode by using the sys.stdout.encoding,
>> but even if I'm right that's a fragile solution: running
>> under the SciTE editor, eg, sys.stdout.encoding is None.
>> 3) Is there something more obvious which I've missed?
>
> Yes use 'mbcs' codec :)
>
> HTH
>
> Niki Spahiev
Thank you so much. I knew there'd be something nice
and obvious which I'd overlooked.
TJG
More information about the python-win32
mailing list