[locale] IOStream encoding conversions?

Currently I'm messing about with Boost.Locale, I'm intending to use it for my project, but I don't know how to do something along the lines of specifying the external encoding (usually the user's locale, en_US.UTF-8 in my case), and the internal coding of my program (UTF-16), to have input and output converted, possibly using a codecvt. A possible example would be translating UTF-16->POSIX UTF-8 paths, or UTF-8->Windows UTF-16 paths. I've read the examples and 'Using Boost.Locale' documentation, but I can't figure out how to do it. In fact, the closest to this is in the 'Character Set Conversions' documentation, where somehow a generator is the boost::locale::conv namespace, but that doesn't work with streams. I tried to pry open the test code only to not understand much. I've searched the web for solutions, but since there's only limited use and documentation of this, I'm starting to wonder if I'm using the right tool for the job.
participants (1)
-
Jookia