It depends what your target knows how to display. Eg. on Linux, you can do:
Code: Select all
std::string latin1Name, utf8Name;
session << "select myName from myTable", into(latin1Name), now;
TextConverter converter(latin1, utf8);
std::cout << utf8Name << std::endl
And if your console is UTF-8 capable, it'll display characters right. On Windows, you'll want to use UTF-16 (see Poco::UnicodeConverter class).
Although I don't think it should affect this particular case, you may get hit elsewhere, so a word of warning is in place: we have just fixed a UTF-8 encoding bug
for the upcoming 1.3.4 release.
Also, this just gave me an idea that it would be a good thing to enable Data library with text conversion capabilities. Now, if only I could find a volunteer to do the work