Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem including commctrl.h. Pin
blackmesa4-Jul-03 4:45
blackmesa4-Jul-03 4:45 
GeneralRe: Problem including commctrl.h. Pin
Ryan Binns4-Jul-03 4:55
Ryan Binns4-Jul-03 4:55 
GeneralWide iostreams Pin
Taka Muraoka4-Jul-03 4:06
Taka Muraoka4-Jul-03 4:06 
GeneralRe: Wide iostreams Pin
Michael Dunn4-Jul-03 5:17
sitebuilderMichael Dunn4-Jul-03 5:17 
GeneralRe: Wide iostreams Pin
Ryan Binns4-Jul-03 5:21
Ryan Binns4-Jul-03 5:21 
GeneralRe: Wide iostreams Pin
Taka Muraoka4-Jul-03 12:41
Taka Muraoka4-Jul-03 12:41 
GeneralRe: Wide iostreams Pin
Taka Muraoka4-Jul-03 13:00
Taka Muraoka4-Jul-03 13:00 
GeneralRe: Wide iostreams Pin
Taka Muraoka4-Jul-03 15:08
Taka Muraoka4-Jul-03 15:08 
This is just fscked!!!

According to this guy[^]:

The standard *does not* provide a way to output (i.e.: to write on a disk file) a stream of wide characters. You can put wide characters into a wide stream but you will always obtain a file of "narrow" characters, obtained through a "degenerate conversion" as explictly specified in the standard.

Also here[^]:

On Win32, VC++ 6sp5, STLport the following test program produces the output 52 (0x34) instead of 4660 (0x1234). According to the standard, this behaviour is perfectly conformant.

int main()
{
     wchar_t a = L'\x1234';

     std::wofstream out("test.txt", std::ios::binary);
     out << a;
     out.close();

     std::wifstream in("test.txt", std::ios::binary);
     in >> a;
     in.close();

     std::cout << unsigned(a) << std::endl;
     return 0;
}



(The second poster also makes the interesting point:
the ios::binary is required, because the I/O library could apply CRLF translation to a part of a two-byte character.
)

This makes no sense. What possible justification could there be to have wide streams output narrow?! The only thing I can think of is possible problems with sending wide data to the console, for example, but surely it would be preferable to hack wcout et.al. rather than crippling wide streams! WTF | :WTF:




Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live.

Awasu 1.1[^]: A free RSS reader with support for Code Project.

Generalmemory leak Pin
pranavamhari4-Jul-03 3:31
pranavamhari4-Jul-03 3:31 
GeneralRe: memory leak Pin
John M. Drescher4-Jul-03 3:53
John M. Drescher4-Jul-03 3:53 
GeneralRe: memory leak Pin
pranavamhari4-Jul-03 19:05
pranavamhari4-Jul-03 19:05 
GeneralRe: memory leak Pin
John M. Drescher5-Jul-03 3:29
John M. Drescher5-Jul-03 3:29 
GeneralRe: memory leak Pin
John M. Drescher5-Jul-03 3:30
John M. Drescher5-Jul-03 3:30 
GeneralRe: memory leak Pin
pranavamhari5-Jul-03 20:58
pranavamhari5-Jul-03 20:58 
GeneralCOM passing Pin
Anthony98874-Jul-03 3:27
Anthony98874-Jul-03 3:27 
GeneralRe: COM passing Pin
valikac4-Jul-03 5:05
valikac4-Jul-03 5:05 
GeneralRe: COM passing Pin
Anthony98874-Jul-03 7:42
Anthony98874-Jul-03 7:42 
QuestionWhats true? MSDN or source code? Pin
Dominik Reichl4-Jul-03 2:12
Dominik Reichl4-Jul-03 2:12 
AnswerRe: Whats true? MSDN or source code? Pin
Ryan Binns4-Jul-03 2:16
Ryan Binns4-Jul-03 2:16 
GeneralRe: Whats true? MSDN or source code? Pin
Dominik Reichl4-Jul-03 2:23
Dominik Reichl4-Jul-03 2:23 
GeneralRe: Whats true? MSDN or source code? Pin
Dominik Reichl4-Jul-03 2:25
Dominik Reichl4-Jul-03 2:25 
GeneralRe: Whats true? MSDN or source code? Pin
Ryan Binns4-Jul-03 2:29
Ryan Binns4-Jul-03 2:29 
QuestionHow to convert .exe MFC project into .ocx MFC project? Pin
Mohammed Jawed Perwez4-Jul-03 2:09
Mohammed Jawed Perwez4-Jul-03 2:09 
QuestionHas anyone found a workaround for VC++ 6.0 when using Access 2K? Pin
WREY4-Jul-03 0:25
WREY4-Jul-03 0:25 
AnswerRe: Has anyone found a workaround for VC++ 6.0 when using Access 2K? Pin
Michael P Butler4-Jul-03 0:32
Michael P Butler4-Jul-03 0:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.