Changeset 1761 for pykota/trunk/cgi-bin
- Timestamp:
- 10/02/04 07:48:56 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/printquota.cgi
r1693 r1761 24 24 # 25 25 # $Log$ 26 # Revision 1.37 2004/10/02 05:48:56 jalet 27 # Should now correctly deal with charsets both when storing into databases and when 28 # retrieving datas. Works with both PostgreSQL and LDAP. 29 # 26 30 # Revision 1.36 2004/09/02 10:34:09 jalet 27 31 # Fixed problem with mod_auth_ldap Apache module … … 195 199 langs = [l.strip().split(';')[0] for l in languages.split(",")] 196 200 return "%s_%s" % (langs[0], langs[0].upper()) 201 202 def getCharsetPreference() : 203 """Returns the preferred charset.""" 204 charsets = os.environ.get("HTTP_ACCEPT_CHARSET", "no charset defined") 205 charsets = [l.strip().split(';')[0] for l in charsets.split(",")] 206 return charsets[0] 197 207 198 208 class PyKotaReportGUI(PyKotaTool) : … … 351 361 if __name__ == "__main__" : 352 362 os.environ["LC_ALL"] = getLanguagePreference() 353 admin = PyKotaReportGUI(lang=os.environ["LC_ALL"] )363 admin = PyKotaReportGUI(lang=os.environ["LC_ALL"], charset=getCharsetPreference()) 354 364 admin.form = cgi.FieldStorage() 355 365 admin.guiAction()