[py2exe.i18n] English works, German works, but not French. What do I miss?
franz.geiger at fh-vorarlberg.ac.at
Fri Aug 6 09:52:35 CEST 2004
"Harald Massa" <cpl.19.ghum at spamgourmet.com> wrote in message
news:Xns953D5E610BA51cpl19ghumspamgourmet at 184.108.40.206...
> "F. GEIGER" <f.geiger at vol.at> wrote in news:cev7g9$3fm$1 at newshispeed.ch:
> > When I start a py2exe-ed application I get the error
> > 'ascii' codec can't encode character u'\xe9' in position 10: ordinal
> > not in range(128)
> encodings: prepare to spend the night.
> First reading:
> your error msg says that you are trying to encode sth. NOT ASCII to
> I guess:
> your lokale site has another encoding configured
> import sys
> -- returns sth. like Latin-1
> And the py2exed application does not read siteconfig.py, and so in the
> running app sys.getdefaultencoding() would be some thing different.
> My approach to this is:
> in the beginning of the app I write:
> import sys
> if hasattr(sys,"setdefaultencoding"):
if hasattr() returns False, that means that site.py / sitecustomize.py has
been exec'ed and has deleted the attr 'setdefaultencoding', right?
pass # site.py did it already for us and everything should work
> so ... when no site-config was run, I manually set my default encoding to
> works great (together with what I described within the wiki)
Thank you, Harald, as I am traveling right now, I'll be able to try this in
More information about the Python-list