In the following code:
char test[50];
sprintf(test, "áéíóú");
is there a way to make sprintf interpret input characters as Windows-1252 instead of Unicode?
I mean, to make test contain 0xE1E9EDF3FA… instead of 0xC3A1C3A9C3ADC3B3C3BA…
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.
You have to edit this from inside your text editing program. This is a matter of the actual file that contains your source code.
To do that in most editors and IDEs there is a menu called ENCODING
EDIT: More specifically for Geany, which appears to be the software you are running go to:
Document >> Set Encoding >> West European >> Western (1252)