I would like to use \u
escape sequences in text, but the conversion seems confusing right now.
As far as I understand \u
uses notation \uXXXX
where X
is a hex digit, and describes a codepoint in utf8? plane? But utf8 is a variable length encoding so it's not necessarily 4 digits long?
So how one goes in converting wxString[0] -> '\uXXXX'
sequece? Do I use mb_str(wxConvUTF8)
or what? All this unicode conversion stuff seems really confusing to me right now.
And what to do with the opposite conversion? If I receive the input with '\uXXXX' sequences, which is the correct way to find them inline, and convert to unicode characters for output?