[python-win32] Non-ascii character in source code cause 'Exception occurred'
aurora
aurora00 at gmail.com
Mon Jul 3 19:09:16 CEST 2006
I find that putting any non-ascii character in the Python source code
would cause an unspecific "Exception occurred" error. For example,
_u.py
# €
print 'hello'
g:\usr\bin\EmEditor Macros>cscript /e:python _u.py
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
CScript Error: Execution of the Windows Script Host failed. (Exception
occurred. )
Any presence of a non-ascii character, even if it is in the comment only,
would cause this problem. I have tried various encoding, with or without
BOM, and also adding the encoding specification at the top of the file.
All these give the same result. On the other hand a similar Javascript
would run alright.
Is this a win32 implementation issue?
wy
More information about the Python-win32
mailing list