UTF-8 represents Unicode characters by a series of bytes, of
between 1 and 6
bytes in length - true ASCII characters (of value less than
128) are also
valid UTF-8 and represented by 1 byte, and all other characters are
represented by more than one byte. You can put any char
value you
Chris Vine wrote:
... As in your example you are hardwiring the text into the
source code, then the best thing is not to convert the text, but to write the
hardwired string in UTF-8 in the first place. (As it happens, BUTTON is
valid ASCII and therefore valid UTF-8.)
What does that mean?
On Saturday 29 October 2005 09:49, Matthias Kaeppler wrote:
I'd have another question though. First, what's the difference between
these two conversions:
std::string ascii = text;
// what's the difference between this ...
Glib::ustring unicode = ascii;
// ... and this?
Glib::ustring
Hi,
I am considering to completely remove std::string from my application in
favor of Glib::ustring, but I stumbled across some problems:
For one, I am using STL algos such as std::lexicographical_compare. Will
they work with a Glib::ustring?
Also I am using boost::filesystem, which is based
Vinzenz 'evilissimo' Feenstra wrote:
Since there is a operator std::string() in Glib::ustring you will be
abled using everything what wants a std::string, but I don't think that
neither the algorithms nor boost::filesystem will work with a utf8
encoding. So you might use locale_from_utf and
Dear Matthias,
Since there is a operator std::string() in Glib::ustring you will be
abled using everything what wants a std::string, but I don't think that
neither the algorithms nor boost::filesystem will work with a utf8
encoding. So you might use locale_from_utf and locale_to_utf
Dear Gaz,
I don't know a compare,review or something like this. I can only say
what I know. Instead of std::wstring glib::ustring is consequent.
std::wstring uses on some systems the 32-Bit and on other systems like
windows wchar_t is only 16 Bit ( unsigned short )
I know that there are some
Hi, Mathias,
There is of course a way to use the filenames and convert them to utf8
and back how you can see here:
#include iostream
#include glibmm.h
int main(int argc, char**argv)
{
std::string iso = äüöß We germans love our umlauts and want
to keep them;
Glib::ustring utf8
Hello!
Since there is a operator std::string() in Glib::ustring you will be abled
using everything what wants a std::string, but I don't think that neither
the algorithms nor boost::filesystem will work with a utf8 encoding. So you
might use locale_from_utf and locale_to_utf functions to
On Friday 28 October 2005 13:00, Matthias Kaeppler wrote:
Let's say I have a filename named übung1.txt (Note the umlaut--if your
newsreader can display it hehe).
Will this filename make trouble with std::string, or be lost/replaced
when converting to Unicode?
UTF-8 represents Unicode
10 matches
Mail list logo