Re: [Tutor] local daynames in unicode

2007-01-31 Thread frank h.
hm I guess I found an answer myself on windows, the default encoding is not 'utf8' thus, if I use encoding = locale.getlocale()[1] t.decode(encoding) instead of t.decode('utf8') it works On 1/31/07, frank h. <[EMAIL PROTECTED]> wrote: Hello all, using python 2.4.4, I have the following ses

[Tutor] local daynames in unicode

2007-01-31 Thread frank h.
Hello all, using python 2.4.4, I have the following session on Mac OS X: import datetime, locale locale.setlocale(locale.LC_ALL, 'se_SE') t=datetime.date(2007,01,29).strftime("%A") t 'M?\xa5ndag' type(t) t.decode('utf8') u'M\xe5ndag' fantastic! I just got the unicode version of the swedish name