Hi,
I'm using boost 1.33.0 on windows (VC++6).
I would like to use a code_converter to convert internal std::wstring's
(which I understand are ucs2 in windows/vstudio, but that shouldn't
matter here I guess) to utf-8 when saving to file.
Here is the failing code:
<code>
void main()
{
typedef
boost::iostreams::code_converter ::operator*() operator*() asserts on initialized_ which is false in this case.
I've tried both with vc++6 sp5 and vc++ 7.1 with the same results.
Also, there is no difference if I use this typedef for my_sink:
typedef boost::iostreams::code_converterboost::iostreams::file_sink
my_sink;
so I don't think my codecvt implementation is to blame...
The file out.txt actually gets filled with the expected data.
Am I going about this the completely wrong way or am I just missing some
important detail?
Any help would be greatly appreciated,
Niklas Wiberg