[Pythonmac-SIG] Problem (and workaround) with XCode and Python projects - non ascii characters in user's name

Juan C. Méndez jcmendez at alum.mit.edu
Tue Nov 27 13:50:39 CET 2007

When a new project is created, XCode takes the user name and pre-fills the
headers of the source files. In Python projects, this creates a problem if
the user's name has non ascii characters (like accents). The problem is that
the application builds and fails with these messages like the ones below in
the console. 11/18/07 12:10:36 AM kkpycd[33468] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason:
'/Users/jcmendez/kkpycd/main.m:44 main() PyRun_SimpleFile failed with file
See console for errors.' 11/18/07 12:10:36 AM kkpycd[33468] Stack: (
2490802795, 2487529627, 2490802251, 2490802314 ) Tracking the problem it's
possible to see that: 11/18/07 12:11:11 AM
[0x0-0xb40b4].com.yourcompany.kkpy2[95313] SyntaxError: Non-ASCII character
'\x8e' in file
on line 5, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details Not a big deal, but may
deter many Python folks from writing Cocoa apps. Already filed a bug report
with Apple, but thought it may be interesting to post in this list as well.
Juan C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20071127/1c372ffc/attachment.htm 

More information about the Pythonmac-SIG mailing list