Re: utf-8 read/write file

2008-10-09 Thread gigs
Kent Johnson wrote: On Oct 8, 5:55 pm, gigs [EMAIL PROTECTED] wrote: Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] 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

Re: utf-8 read/write file

2008-10-08 Thread Benjamin
On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] 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 (Š,Đ,Ž,Č,Ć). Can you show us what you have so far? How can I read/write

Re: utf-8 read/write file

2008-10-08 Thread gigs
Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] 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 (Š,Đ,Ž,Č,Ć). Can you show us what you have so far? How can

Re: utf-8 read/write file

2008-10-08 Thread Aleksandar Radulovic
Hi, What is the encoding of the file1 you're reading from? I just ran tests on my machine (OS X) with both python2.5 and 2.6 and was able to read from a file containing: život je lep The file is UTF-8 encoded. data = open(test.txt).read() data '\xc5\xbeivot je lep.' f = open(test2.txt, wb)

Re: utf-8 read/write file

2008-10-08 Thread Kent Johnson
On Oct 8, 5:55 pm, gigs [EMAIL PROTECTED] wrote: Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] 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