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; ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    88

    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.

    Thanks for any help.

    Joe

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    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).

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    88
    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.

    Joe

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. makefile exported by vc 6.0 doesn't work
    By wow in forum Windows Programming
    Replies: 7
    Last Post: 03-24-2006, 03:20 PM
  2. Can't compile this with VC 6.0
    By uriel2013 in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2003, 07:43 PM
  3. Visual Studio 6.0 Help
    By L_I_Programmer in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2003, 09:35 PM
  4. adding a header file in VC 6.0
    By stimpyzu in forum C++ Programming
    Replies: 5
    Last Post: 10-28-2002, 01:26 AM
  5. VC 6.0 compiled error
    By alan4100 in forum Windows Programming
    Replies: 4
    Last Post: 09-17-2001, 03:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21