On Thu, Jan 26, 2012 at 11:55 AM, Christopher <cpisz@austin.rr.com> wrote:
So, I conceded that, in order to actually stream unicode to file, I'd have to
read and write it as bytes, and insert the BOM myself. It would seem, that for
the time being, "There is no standard C++ or Microsoft way to stream unicode
to file" (without some nuances).

This is all what I gleamed through my debugging woes with unicode. I could be
wrong.


Have you tried Boost.Locale? I'm using it for UTF-8 in my Windows application and file output seems to be working fine (obviously you have to imbue the fstream with the locale provided by the library). I output text to a file (Greek, Russian, and Arabic, 3 lines, all in the same file), and then opened it in UltraEdit, which correctly opened it as a UTF-8 encoded file...

Disclaimer: I am by no means an i18n/l10n expert so what I'm saying may be totally stupid and wrong.