On Mon, 2011-01-10 at 03:20 -0800, Stefan Fruehwirth wrote: > Hi, > > I get an UnicodeEncodeError when running the generated executable out > of this line of code in a script: > > --- > print u'confusing cat: \u0283i-wa\u0127\u0259d' > --- > > That's all. Full Traceback: > > --- > Traceback (most recent call last): > File "<string>", line 1, in <module> > File ".\pyInstallerUnicodeIssue\build > \pyi.win32\pyInstallerUnicodeIssue\outPYZ1.pyz/encodings.cp850", line > 12, in encode > UnicodeEncodeError: 'charmap' codec can't encode character u'\u0283' > in position 15: character maps to <undefined> > --- > > Executable was generated with the standard Makespec/Build process - no > modifications. Spec and other files can be posted as needed. Is this > some sort of configuration error or should I consider it a bug and > post it to trac?
It is well possible that the console/stdout is configured with a different encoding within PyInstaller rather than the interpreter version. For instance, PyInstaller does not use the computer's site.py module, so if the encoding for stdout is set there, there can be a different behaviour. I don't know off the top of my head how Python decides which encoding must be used for stdout on Windows (or any other platform), nor how (and if) it can be programatically changed from within an application. If you want to pursue this bug, you will have to find out how this whole thing works, and then we can decided whether or how to fix this issue. -- Giovanni Bajo :: [email protected] Develer S.r.l. :: http://www.develer.com My Blog: http://giovanni.bajo.it Last post: Compile-time Function Execution in D -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
