assuming that I have
uint32_t a(3084);
I would like to create a string that stores the unicode character U+3084
which means that I
auto s = u8"\343\202\204"; // Octal escaped representation of HIRAGANA LETTER YA
std::cout << s << std::endl;
prints
や
for me (using g++ 4.8.1). s
has type const char*
, as you'd expect, but I don't know if this is implementation defined. Unfortunately C++ doesn't have any support for manipulation of UTF8 strings are far as I know; for that you need to use a library like Glib::ustring
.