This morning, I spent most of the time to know how to convert an ICU UnicodeString to an UTF-8 string.
the result is so simple, but no documentation, nowhere on google land...
The ICU documentation is obviously not so up-to-date.
I am using the latest version of ICU thought (4.2).
so to convert UnicodeString to std::string is simple as:
UnicodeString us = ...;
string cs;
us.toUTF8String(cs);
so simple but so complex to find, I ended up to look at the source code...
so I hope it will be helpful for others....
Helped me :)
RépondreSupprimerThanks.
bien joué,
RépondreSupprimerje cherche ça depuis ce matin !
very helpfull
RépondreSupprimerMerci.
RépondreSupprimerThanks! :)
RépondreSupprimerThank you! I was getting really frustrated...
RépondreSupprimer