[Tutor] symbol encoding and processing problem

Tim Golden mail at timgolden.me.uk
Wed Oct 17 14:50:19 CEST 2007


Timmie wrote:
>>> from easygui import easygui
>>> raw = unicode("121ø 55' 5.55''", 'utf-8')
>>> => gets a encoding error
>> Then your source file is not really in UTF-8.
> This really helped!
> 
>  
>> Get an editor on Windows that can edit UTF-8 text files and file 
>> transfer software that doesn't change the text encoding. Work with UTF-8 
>> exclusively.
> Thanks. This sounds really trivial but the thing is that one cannot define file
> encoding in PythonWin.
> I will have to either use a advanced editor like Notepad++ and run the script
> via console or use Geany as IDE.

I'm sure there'll be lots of other suggestions, but the SciTE
editor (whose name I'm never sure how to prononunce without
blushing) understands the same encoding directive as Python.
It's quite lightweight, and also allows you to run Python scripts
directly, although there are limitations. Worth looking at, anyhow.

http://www.scintilla.org/SciTE.html

TJG


More information about the Tutor mailing list