0

I have no idea how to solve the character encoding for the swedish letters "å" "ä" "ö".

It works fine in Eclipse where the encoding is set to Cp1252. BUT - when I execute the same program in windows CMD I can not any longer see these characters. I have tried to change the encoding in CMD to 1252 and 65001, that is: chcp 1252 and chcp 65001 ... but NOPE!

Have even tried with a library function in C called setlocale, that is:

setlocale(LC_ALL, "swedish");

MANY THANKS TO SUGGESTIONS THAT SOLVES THIS ISSUE!!!!!!!

Björn Hallström
  • 3,775
  • 9
  • 39
  • 50
  • Did you read http://stackoverflow.com/questions/18682268/encoding-c-language-cmd-windows and http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how ? – Étienne Sep 21 '13 at 17:48
  • Are your strings ANSII ASCII? Or multi-byte? – Yury Schkatula Sep 21 '13 at 18:24

1 Answers1

0

Just do

setlocale(LC_ALL, "SE");
AndersK
  • 35,813
  • 6
  • 60
  • 86
  • have you installed Swedish characters? what is the default language in your OS? The above works for me in US-en Win7 Prof with Swedish keyboard installed. – AndersK Sep 23 '13 at 05:10