Hi there.
I am trying to convert my program from reading from and writing to files with ANSI encoding to reading from and writing to files with unicode encoding. I am using notepad to read/write the files. I have been looking at my new files in a hex editor and they are being saved in unicode (when I type things in in notepad).
I am using Microsoft Visual C++ 6. Within my program I am using _T, _ftprintf etc. I have defined UNICODE and _UNICODE for all configurations under both the C/C++ and the Resources settings, and I have wWinMainCRTStartup defined as my entry point.
However the program is still reading and writing one-byte characters. Eg when it reads in "Hello" it gets FF FE 48 00 (the 48 00 being the unicode H) and reads this as a three-character string made up of 1) y-umlaut, 2) something that looks like the Old English letter thorn, 3) the H, and then some whitespace.
Please, if you have any idea why this is happening I would be very grateful, I'm at a complete loss.
Thank you very much.
I am trying to convert my program from reading from and writing to files with ANSI encoding to reading from and writing to files with unicode encoding. I am using notepad to read/write the files. I have been looking at my new files in a hex editor and they are being saved in unicode (when I type things in in notepad).
I am using Microsoft Visual C++ 6. Within my program I am using _T, _ftprintf etc. I have defined UNICODE and _UNICODE for all configurations under both the C/C++ and the Resources settings, and I have wWinMainCRTStartup defined as my entry point.
However the program is still reading and writing one-byte characters. Eg when it reads in "Hello" it gets FF FE 48 00 (the 48 00 being the unicode H) and reads this as a three-character string made up of 1) y-umlaut, 2) something that looks like the Old English letter thorn, 3) the H, and then some whitespace.
Please, if you have any idea why this is happening I would be very grateful, I'm at a complete loss.
Thank you very much.