Re: [Tutor] Unicode trouble

2005-12-01 Thread Kent Johnson
Øyvind wrote: >>The important question is, what is actual encoding of your source data? >> >>>Is there anything else I could try? > > >>Understand why the above question is important, then answer it. Until you > > do >you are just thrashing around in the dark. > > The source is a text-document

Re: [Tutor] Unicode trouble

2005-12-01 Thread Kent Johnson
Øyvind wrote: > I tried the error='replace' as you suggested and the program made it thru > the list. However, here are some results: > > the gjenoppl�et gjenoppl� > from > the gjenoppløst det gjenoppløste > > kan v� konsentrert > from > kan være konsentrert It seems pretty clear tha

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Michael Lange wrote: > On Wed, 30 Nov 2005 13:41:54 -0500 > Kent Johnson <[EMAIL PROTECTED]> wrote: >This is the full error: >Traceback (most recent call last): > File >"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", >line 310, in RunScript > ex

Re: [Tutor] Unicode trouble

2005-11-30 Thread Michael Lange
On Wed, 30 Nov 2005 13:41:54 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > >>>This is the full error: > >>>Traceback (most recent call last): > >>> File > >>>"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > >>>line 310, in RunScript > >>>exec codeObject in __main

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > Øyvind wrote: > >>>Where are you getting these errors (what line of the program)? Do you >> >>know >what kind of strings objSelection.Find.Execute() is expecting? >> >> >>>Kent >> >> >>>The program stops working and gives me these errors when I try to run it >>>when it encounters a

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > >>Where are you getting these errors (what line of the program)? Do you > > know >what kind of strings objSelection.Find.Execute() is expecting? > >>Kent > > > The program stops working and gives me these errors when I try to run it > when it encounters a non-english letter. >

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > Hello. > > I am writing a program that reads in a text file, extracts each of the > words and replaces a different document with the words. It works great > until it encounter a non-english letter. > > I have tried the following: > > self.f = codecs.open(ordliste, 'r', 'utf-8') >