[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: creating a QString with (escaped) unicode characters
From: Paul Temple <paul.temple () gmx ! net>
Date: 2005-01-28 3:36:26
Message-ID: 200501280436.26682.paul.temple () gmx ! net
[Download RAW message or body]
Hi list,
as I'm new to C++ I don't know how to properly create a QString
containing non-latin characters which are escaped in a latin-1
encoded cpp-file.
In Java I would write this in order to create a string with 2
(japanese) characters:
String s = "\u8f9e\u66f8";
I got a really ugly version after hours of trying and googling (I
told you, I'm a C++ rookie...) of that piece of code in C++/Qt,
as I only managed to create a QChar with a \uXXXX character, but
not a QString:
QString s = QString(QChar(L'\u8f9e')).append(QChar(L'\u66f8'));
And yes, I know about i18n(..) etc., but this is a string which
will _never_ be l10n-ized and I won't outsource 2 little
characters.
Thanks in advance,
Paul
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic