   Unicode question.
  I really haven''t done anything out side of ascii, and am not very familiar with unicode. I understand that unicode instead of using 8 bits it uses 16 bits thus giving you a possibility of 65,536 characters, but when it''s read in a text editor does it read one character as two characters (in ascii) or does it show it as it''s own character of the 65,536 possibilities?and why exactly can''t you do things like copy the contents of a gif file, into a blank gif file that you made using notepad etc?    Pumpkin Pieman - [Blogger]Go to war again, blood is freedom''s stain, But don''t you pray for my soul anymore. 
  It depends on the text editor.  Most should support unicode.  If it does, then it should be able to figure out, based on the first few bytes of the file, whether it is unicode or not.  If it is unicode, then it will display it, using 16 bits per character, and using fancy characters, if they''re available.  If the editor doesn''t support unicode, however, then most likely, it''ll just spit everything out as though there were 8 bits to each character.  With standard English stuff, I''m thinking that every other character is just 0x00, and the others are standard ANSI characters, and this will be probably be displayed as characters with spaces between each one.As for the GIF stuff, notepad is not really made to support byte values 0x00-0xFF.  Find a good hex-editor for that sort of stuff. ;  If I were to open a unicode file with fstream would it output unicode characters?    Pumpkin Pieman - [Blogger]Go to war again, blood is freedom''s stain, But don''t you pray for my soul anymore. ;  You can define your own iostream class that uses wchar_t instead of char. fstream is simply a typedef using basic_fstream<char>.   Colin Jeanne | Invader''s Realm"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud ;  is wchar_t already a predefined type for a 16bit character?    Pumpkin Pieman - [Blogger]Go to war again, blood is freedom''s stain, But don''t you pray for my soul anymore. ;  wchar_t is a part of the language representing wide characters (like Unicode characters).   Colin Jeanne | Invader''s Realm"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud ;  and how do you know if a file you''re opening is in unicode?    Pumpkin Pieman - [Blogger]Go to war again, blood is freedom''s stain, But don''t you pray for my soul anymore. ;  You normally know the specifications of files you are opening Oo ;quote:Original post by Invader X   You can define your own iostream class that uses wchar_t instead of char. fstream is simply a typedef using basic_fstream<char>.And std::wfstream is a typedef for std::basic_fstream<wchar_t>.quote:Original post by PumpkinPieman   and how do you know if a file you're opening is in unicode?   As with all file formats issues, you can't tell a priori. Either you know, or you don't.  “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”    — Brian W. Kernighan (C programming language co-inventor) [edited by - Fruny on February 18, 2004 10:59:37 AM];  So if I open a text file with the predefined type for a 16 bit character and I out put it to another file, will it still show the same characters? 