I have the lovely functions from my previous question, which work fine if I do this:
wstring temp;
wcin >> temp;
string whatever( toUTF8(getSomeWString()) );
// store whatever, copy, but do not use it as UTF8 (see below)
wcout << toUTF16(whatever) << endl;
The original form is reproduced, but the in between form often contains extra characters. If I enter for example àçé
as the input, and add a cout << whatever
statement, i'll get …‡‚
as output.
Can I still use this string to compare to others, procured from an ASCII source? Or asked differently: if I would output …‡‚
through the UTF8 cout in linux, would it read àçé
? Is the byte content of a string àçé
, read in UTF8 linux by cin, exactly the same as what the Win32 API gets me?
Thanks!
PS: the reason I'm asking is because I need to use the string a lot to compare to other read values (comparing and concatenating...).