xml.parsers.expat and utf-8

2005-05-03 Thread dagurp
I have this code: import xml.parsers.expat parser = xml.parsers.expat.ParserCreate(encoding="UTF-8") text = unicode("þórður",'UTF-8') print parser.Parse(text,1) And this is what I get: UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-6: ordinal not in range(128) I think I

Re: Locale and cookies

2005-05-03 Thread dagurp
Setting it to "C" worked fine. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Locale and cookies

2005-05-02 Thread dagurp
I'm doing a small mod_python project and I'm using a locale for my own language. This is not a problem until I start using cookies because the cookie module in mod_python uses time.strftime() to write the expiration times and therefore makes invalid cookies. I tried to fix this by changing the loca