View Single Post
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#1
There I am back with one of my (probably stupid) questions!

I have a problem with handling non-ascii characters in python and was wondering whether one of the Python buffs could help me out. Here's the problem:

(For my application menu folder application) I would like to offer the user a way to enter names for their folders that include non-ascii characters. Entering them in a widget works fine, but as soon as I try to work with the string (for which I think I HAVE to convert it into a QString?), things get nasty. It works fine when I get rid of the non-ascii chars beforehand, but this results in a rather crippled, non-international functionality.

Same with reading application names. As soon as my scripts run into a name that features non-ascii characters, it simply ignores the entry and jumps right to the next one.

Is there any way to deal with non-ascii characters in Python OTHER than simply getting rid of them?

Thanks in advance!