wofstream Fails in VC++ 6.0

This is a discussion on wofstream Fails in VC++ 6.0 within the C++ Programming forums, part of the General Programming Boards category; The following code does not work in VC++ 6.0 SP6:
wchar_t ch = 9888;
wout << L"test1"
wout << ch;
...

wofstream Fails in VC++ 6.0

The following code does not work in VC++ 6.0 SP6:

wchar_t ch = 9888;
wout << L"test1"
wout << ch;
wout << L"test2";

When I run the code(with the appropriate include and using statements), it does not successfully output the character or test2 in the console. This problem is a known problem with wide characters that use the second byte according to this article http://support.microsoft.com/default...b;en-us;274012 . However, it was supposedly solved in SP5. Does anyone know why this is still failling even with the SP6 upgrade?

Is there anything I can do to solve the problem? The wout.clear() is not an option because I am output entire wstrings that may contain characters that do not display properly because of this bug.

I see the same problem -- installed SP6 tonight and the problem still persists. I used the example program from the link you posted, except I had to comment out the wfout.imbue(std::locale("Japanese")); line because I got an assert error, probably because I don't have Japanese language on my computer (XP with SP2).

I had the same exception as well occur as a result of the japanese. Glad to know I am not the only one who is experiencing this. Very unglad to know that this might be a bug with no fix . Thanks for the info.

If anyone knows how to make this work, please share whatever information you can.