Turkish character problem in pure C++



I couldn't solve Turkish character problem in C++(standard library).If I use wstring for a Turkish character,writing:

wstring TurkishCharacters;

and then :

TurkishCharacter=L"çı"; // I don't know if you are able to see the
//Turkish characters
// "ç",it is a character similar to "c" and the other character
// is similar to "i" but a bit different.

It gives this error:
"... error: converting to execution character set: Invalid argument"

If I don't use "L" it gives another error.

But for example,if I use:

1
2
getline(wcin,TurkishCharacter);
wcout << TurkishCharacter;


It is able to print what I entered from keyboard.But I am not able to assign a text to a string without
requesting user input...



If I use string instead of wstring,then I am able to assign Turkish characters to a string

1
2
string TurkishCharacter;
Turkishcharacter="çı";


Although it doesn't give any error,it doesn't work as expected,cout prints abnormal characters.
C++ doesn't support non-ASCII characters in sources. You'll have to assign to the string characters directly:
1
2
3
std::wstring s;
s.push_back(1024);
s.push_back(1025);
Thanks for your answers.Could you write a simple full code which uses Turkish characters in source?I am a newbie and couldn't understand what should I do exactly.
Topic archived. No new replies allowed.