tullhead
asked on
Stringtable strings show nice umlauts; text read from file shows up like "für" -- how to fix?
My world is: MFC, Visual Studio C++, using MBCS character set. Generally using CString as my favorite string type, but sometimes std:string as well.
I can put German words in my string table and they show up in the GUI just fine - full of lovely umlauts and other accents. But if I have a *.txt file containing German text with umlauts, when I read it in (using CStdioFile) and then show it in the GUI, the umlauts and other special characters do not print nicely, instead things like für showing up (should be "fur" with an umlaut on the u).
How can I read a *.txt file of German text and show it in the GUI? Thought this was simple. I could swear I've done it before without issue. Thanks in advance for your help!
I can put German words in my string table and they show up in the GUI just fine - full of lovely umlauts and other accents. But if I have a *.txt file containing German text with umlauts, when I read it in (using CStdioFile) and then show it in the GUI, the umlauts and other special characters do not print nicely, instead things like für showing up (should be "fur" with an umlaut on the u).
How can I read a *.txt file of German text and show it in the GUI? Thought this was simple. I could swear I've done it before without issue. Thanks in advance for your help!
this text file is probably utf-8 and not windows-1252 ascii
ASKER
The text file is (in most cases) created by me copying and pasting from the Google translate webpage. So, is there some special way I should do this in order that the file be some other format? Open a text file in Notepad and paste in stuff -- what control do I have over this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oh great -- it worked -- even in simple NotePad, I could save out as "ANSI" instead of UTF-8 -- now it reads into my system and displays properly. Great! Thanks so much.