utf-8 read/write file

gigs gigs at hi.t-com.hr
Thu Oct 9 13:19:47 EDT 2008


Kent Johnson wrote:
> On Oct 8, 5:55 pm, gigs <g... at hi.t-com.hr> wrote:
>> Benjamin wrote:
>>> On Oct 8, 12:49 pm, Bruno <Br... at hi.t-com.hr> wrote:
>>>> Hi!
>>>> I have big .txt file which i want to read, process and write to another .txt file.
>>>> I have done script for that, but im having problem with croatian characters
>>>> (©,Ð,®,È,Æ).
>> UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0:
>> unexpected code byte
> 
> Are you sure you have UTF-8 data? I guess your file is encoded in
> CP1250 or CP1252; in both of these charsets 0x9e represents LATIN
> SMALL LETTER Z WITH CARON.
> 
> Kent

This data wasnt in utf-8 probably, today i get another one utf-8 and its working

thanks



More information about the Python-list mailing list