[Freeipa-devel] [PATCH] fix encoding of loaded templates
Rob Crittenden
rcritten at redhat.com
Tue Jul 22 19:29:36 UTC 2008
We used to manually load the template files for the edit pages using
turbogears.meta.load_kid_template(). Unfortunately this went through the
one code path where encoding was completely ignored. It ended up
defaulting to sys.getdefaultencoding() which is 'ascii'. So even though
most of the templates are loaded as 'utf-8' the few that really mattered
weren't.
The fix is to call kid.load_template() ourselves and set the encoding of
the class we just loaded to either the setting in the app.cfg file or to
the normal default value of 'utf-8'.
This does not remove all i18n issues. We still cannot handle non-ascii
characters that will appear in the DN (group name and uid are two I know
of).
rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-61-encoding.patch
Type: text/x-patch
Size: 8101 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080722/619129a7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080722/619129a7/attachment-0001.bin>
More information about the Freeipa-devel
mailing list