[Tutor] symbol encoding and processing problem
Kent Johnson
kent37 at tds.net
Wed Oct 17 14:07:37 CEST 2007
Timmie wrote:
> I tried your advice yesterday evening.
>
>> And see if you get a ç.
> I see this character.
>
> 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.
BTW you can simply say
raw = u"121ø 55' 5.55''"
> raw = unicode("121ø 55' 5.55''", 'cp1250')
> => this works while coding on windows.
> How do I make it work really crossplatform: On both Linux and Windows?
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.
Kent
More information about the Tutor
mailing list