On Mon, Dec 7, 2009 at 3:07 AM, John Bond <[email protected]> wrote: > Hi all, first post, please be nice.. :o)
Hi. I'll try. :-) > I can't find a way to set a codec alias in my frozen script. As my console > has to run in codepage 65001 (utf-8) or 10000 (utf-16), which for some > reason aren't codec names known to Python out of the box, I've added aliases > for these to <python 31 home>\lib\encoders\aliases.py so that python knows > how to initialise the console on startup when it queries the console for its > current codepage and sees one of these values. > However that doesn't work when my script gets frozen. Furthermore, the > frozen version doesn't seem to pay attention to the PYTHONIOENCODING > environment variable, as the normal interpreter does, which is another way I > could tell it what to use. > Is this a known problem? Is there a workaround? > I've tried including all the encoding related modules I can think of > (including encodings.aliases) in the cxfreeze.bat --include-modules > parameter, but it didn't help. I obviously can't do anything to help in my > actual script, as this is an issue for python startup, before my script gets > to run. First, I think UTF-8 and UTF-16 are "standard" encodings so they should already be available. You might just have the wrong name for it? I'm not a Unicode expert, though, so I might be completely off base, here. Second, there was a bug in the currently publicly released version of cx_Freeze for Python 3.1 in that the encoding setup for the console was essentially ignored. That has been fixed in Subversion. You might want to try that version and let me know if that resolves the problem for you. Finally, if neither of the above works, please send me a script and some instructions on how to replicate your problem and I'll take a look. Thanks. Anthony ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ cx-freeze-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
