Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by wilsonian

  1. wilsonian

    CStdioFile and Unicode

    Right, I tried it using TypeText, and the result was that stuff contained ÿÞH (if that doesn't come out, it's y-umlaut, thorn, capital H) ie the BOM in ASCII + a capital H. To me this looks very much like the program thinks the file is in ANSI format, whereas at least when I used TypeBinary it...
  2. wilsonian

    CStdioFile and Unicode

    I'm 90% sure I tried this and it did something weird, however I will try it again on Friday when I am next at work. Could you explain to me the purpose of TypeBinary and TypeText, because I couldn't make it out from MSDN. Why would TypeBinary let ascii characters work but not others? Thanks...
  3. wilsonian

    CStdioFile and Unicode

    Hi there, I'm trying to read from a unicode file. The contents of the file is the word "hello" followed by a tab and then a schwa (unicode character that looks like an upside-down e) It is saved in unicode, and it has the BOM 0xFF 0xFE at the start. Now I do the following in my...
  4. wilsonian

    Trying to get unicode working

    Hi there, I just found the CStdioFile class which I'd overlooked before and it seems to be dealing with unicode nicely. Thank you very much both of you for your help.
  5. wilsonian

    Trying to get unicode working

    Ok, it's not big endian. How do I use that knowedge to get the program to parse the file properly? Thank you.
  6. wilsonian

    Trying to get unicode working

    Yes, the program is still reading in the string in the file as the ASCII representation of the two bytes indicating that the file is in unicode + "H". Just to clarify, I am not having trouble getting the program to store and manipulate two-byte chars. I am only having trouble reading...
  7. wilsonian

    Trying to get unicode working

    IonFilipski, I thought the whole purpose of _T was to choose char or wchar_t depending on whether UNICODE was defined. I was under the impression that it was equvalent to L. JohnLac, I am using TCHAR, _ftprintf, _tcscopy etc. Eg, here is the code I have been testing with: //Reading from file...
  8. wilsonian

    Trying to get unicode working

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

Part and Inventory Search

Back
Top