Locale and cookies

D

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 locale back to "English" before
creating cookies and that works on Windows but not for Linux. If I use
"en_EN.ISO8859-1" it works on Linux but not on Windows.

I'm sure there's an easy way to fix this.
 
K

Klaus Alexander Seistrup

I tried to fix this by changing the locale back to "English"
before creating cookies and that works on Windows but not for
Linux. If I use "en_EN.ISO8859-1" it works on Linux but not
on Windows.

How about setting locale to "C" or "POSIX"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,237
Messages
2,571,190
Members
47,827
Latest member
wyton

Latest Threads

Top