I can’t find an answer to this question anywhere.
How can I convert a string from UTF-8 to ANSI (extended ASCII) in C++?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally, one uses libiconv (webpage), which is portable and runs on most platforms. As KerrekSB mentioned, you will get in deep trouble if you think of a character set as “extended ASCII” — I’m sure there are at least a hundred character sets that could be called “extended ASCII”, including UTF-8.
Also, make sure you know which encoding you want: ISO-8859-1 or CP1252. The Windows version replaces the C1 control codes with additional printing characters.