Ordinal not in range(128)
fabien.henon at caramail.com
Sun Mar 2 23:49:38 CET 2003
Erik Max Francis wrote:
> Fabien HENON wrote:
>>I have written a POV-RAY editor for Linux using Python and Tkinter.
>>It mostly uses the text widget of Tkinter.
>>You can find it at :
>>As you can add comments in POV-RAY scripts, people who are using
>>extended character (é,à,...) get the following message :
>>UnicodeError: ASCII encoding error: ordinal not in range(128)
> This is a FAQ. All it means that the Unicode object you're trying to
> use as a normal string has not 7-bit clean, and so it can't know what
> encoding you want to use without you giving it more information. Try
> S = U.encode('latin-1')
> or something similar (provided the character set you want really is
In my case, my editor is multilanguage and users can choose between many
fonts. I am not a Unix guru, but latin-1 is for Western Europe (?). Is
it going to work for polish or Spaniards,...
More information about the Python-list