Hi Anthony,
Ok, I'll find myself an SVN client and download the latest.
> First, I think UTF-8 and UTF-16 are "standard" encodings so they
They are, and they're available to my frozen app. The problem is that
Windows consoles use different names for them, which Python doesn't
recognise (though really it should). For example, if I want Unicode in my
console, I have to set it to utf-8 (that's the only fully encodable Unicode
encoding that Windows consoles support) which Windows calls "codepage
65001". I do that with a "chcp 65001" command. When I run Python it gets the
current console codepage from Windows ("cp65001") and doesn't recognise the
name unless I've edited aliases.py to tell it that "cp65001" = "utf-8".
It's strange that Python doesn't come with knowledge of the name of the only
proper Unicode console encoding in Windows, but that's the way it is!
On Tue, Dec 8, 2009 at 1:35 AM, Anthony Tuininga <[email protected]
> wrote:
> 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
>
------------------------------------------------------------------------------
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