Giovanni Bajo napisaĆ(a):
Your source code should look like this:self.trUtf8("foo bar translate this") Notice that the return value of tr()/trUtf8() is obviously a QString (duck-typable and convertible to Python's unicode), so your application will still be fully unicode. It's only the literal in the source code (*immediatly* surrounded by the tr() call) which is a 8-byte str. BTW: since all my sources are UTF-8, I prefer to specify it as default encoding for tr (QTextCodec.setCodecForTr) so that I can later use the shorter tr() everywhere in the code.
Just curious: what happens if I want a string to translate which contains any special unicode symbols, like math operators? I couldn't express them as 8-byte characters...
Tomasz Melcer _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
