5 Nov
2011
5 Nov
'11
2:54 a.m.
On Fri, Nov 4, 2011 at 11:28, Igor R
If I have a string that is in UTF-8, how do I tell the path constructor?
path p1 ("my utf8 data", SOME_CODECVT);
I think it is a matter of passing the right SOME_CODECVT. What is it? The path::value_type is wchar_t, according to the docs.
On Windows you should convert it to utf16.
Word of warning: the boost utf8 codecvt will cause undefined operations if you have and cps above U+FFFF. You'll have to hack do_in to and do_out in order to emit/parse surrogate pairs. Also, hack do_length to increment the counter by 2 for cp>0xFFFF.