It also breaks sessions using before session init. But assigning
locale.LC_NUMERIC seems fine. See the below code :
#!/usr/bin/python2.5
#-*- coding: utf-8 -*-
import locale
#locale.setlocale(locale.LC_ALL,"tr_TR.UTF-8") --> this code breaks
sessions !
locale.setlocale(locale.LC_NUMERIC, locale.getdefaultlocale()) #works
ok
import datetime
import os
import smtplib
import web
##########################################
# WEBPY INIT
##########################################
web.config.session_parameters['timeout'] = 1800 #24 * 60 * 60, # 24
hours in seconds
#web.config.session_parameters['ignore_expiry'] = False
#web.config.session_parameters['ignore_change_ip'] = False
app = web.application(acns.urls, locals())
session = web.session.Session(app, web.session.DiskStore('sessions'),
initializer={'loggedin': False})
render = web.template.render('templates/', cache=False)
.
.
.
etc..
my default locale is :
>>> locale.getdefaultlocale()
('tr_TR', 'UTF8')
I am using python2.5
Any ideas? (can it be related to the upper i in Turkish is upper I
with a dot on it as : İ)
TIA.
On 3 Nisan, 23:31, cagatay <[email protected]> wrote:
> I've realized that, using locale.setlocale(locale.LC_ALL,"") call
> after initialized session, breaks session.
>
> Is this an expected behaviour or am i missing something?
>
> Best regards.
>
> Cagatay
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---