[PyQt] Using Unicode
Gabriel Hahmann
gabriel.hahmann at gmail.com
Wed Jun 17 10:51:32 BST 2009
I'll try this today when I arrive home.
Thanks for the tip.
[]'s
Gabriel.
On Wed, Jun 17, 2009 at 11:05 AM, Raoul
Snyman<raoul.snyman at saturnlaboratories.co.za> wrote:
> Hi Gabriel,
>
> On Wed, 17 Jun 2009 10:31:46 +0200, Gabriel Hahmann wrote:
>> Are you saying something like this:
>>
>> QtGui.QPushButton(self.tr(u'&Next >'))
>>
>> Is that what you mean? Putting an "u" before each string? I´m looking
>> some information about unicode and python and in a few pages I saw
>> that is necessary to do something to decode and show this on screen,
>> is that true?
>
> That's correct. When you use the "print" command in Python, you need to
> decode it back to ascii, but for things like Qt4, it's better to use
> Unicode. Then your strings can contain umlauts and other non-english
> characters.
>
> --
> Raoul Snyman, B.Tech IT (Software Engineering)
> Saturn Laboratories
> e: raoul.snyman at saturnlaboratories.co.za
> w: http://www.saturnlaboratories.co.za/
> b: http://blog.saturnlaboratories.co.za/
> http://raoulsnyman.co.za/
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
More information about the PyQt
mailing list