Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
i18n: looking for expertise
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="klappnase, post: 1808593"] Yes, I used a Tkinter.StringVar to keep track of the contents of an Entry widget; as long as I entered only ascii characters get() returns a byte string, as soon as a special character is entered it returns unicode. Anyway, my UnicodeVar() class seems to be a handy way to avoid problems here. I use a bunch of modules that contain helper functions for frequently repeated tasks. So it sometimes happens for example that I call one of my module functions to convert user input into unicode and then call the next module function to convert it back to byte string to start some file operation; that's what I meant with "excess decode/encode cycles". However, trying to avoid these ended in totally messing up the code. I am using python-2.3.4 and get unicode errors: Traceback (most recent call last): File "<stdin>", line 1, in ? UnicodeEncodeError: 'ascii' codec can't encode characters in position 24-25: ordinal not in range(128) Thanks for the feedback Michael [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
i18n: looking for expertise
Top