On Tue, 2011-08-09 at 10:02 +0200, Sebastian Elsner wrote: 
> Martin, Giovanni, thank you very much for your patience. I have set up a 
> clean Virtual Machine with a new interpreter and now I get the same 
> error in the standard interpreter, too. I have diffed the site.py files, 
> but they are unchanged to the new installation.
> 
> I have also solved my original problem (which I was trying yo reduce 
> with the code given): Reading a Cp1252 encoded file via 
> open("file").read(). It was working with my installation, packaged with 
> pyinstaller it failed. I am now using 
> codecs.open("file",encoding="Cp1252"), which I hope is the correct way 
> and if I compile on the VM it works on the host too.

Yes, using codecs.open() is the correct way to read a text file that you
need to convert into Unicode while parsing.
-- 
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it
Last post: The algorithms behind OTP tokens


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to