unicode values in preferences

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

unicode values in preferences

Alexander Held

I want to store unicode values in apptools preferences using
This does not work out of the box, since the values of a Unicode
PreferencesPage trait are converted using str(...) which fails for
non-ascii characters.
And if the according trait in a PreferencesPage is a Unicode trait, it
is read with unicode(...), which on my system assumes 'ascii' encoding.

I could of course store the values encoded to a plain string using my
favorite encoding,
but then I would loose the benefits of PreferencesPages, since the gui
user does not want to deal with encoded values.

Is there a mechanism that allows me to get control over how values are
converted back and forth between the PreferencesPage traits and the
actual preferences values, to get back the benefits of PreferencesPages?
Or are there any plans to natively support unicode in preferences (if
I'm not mistaken, configobj should support non-ascii encodings)?


Enthought-Dev mailing list
[hidden email]