Terry Carroll wrote:
> I think setting the locale is the trick:
> 
>>>> s1 = open("text.txt").readline()
>>>> print s1
> ANGOUL.ME, Angoumois.
>>>> print s1.title()
> Angoul.Me, Angoumois.
>>>> import locale
>>>> locale.setlocale(locale.LC_ALL,('french'))
> 'French_France.1252'
>>>> print s1.title()
> Angoul.me, Angoumois.

I think your file is cp1252 not utf-8 as the OP specified...

Ken
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to