- 1

How can I print other languages in C++

Title. I want to print something in Hebrew (my language) and I can't for example cout<<"שלום"; Does someone knows how to do it?

2nd Aug 2019, 9:39 PM
Cout
Cout - avatar
14 Answers
+ 2
for example for russian: setlocale(LC_ALL, "rus");
2nd Aug 2019, 9:57 PM
Marina Vasilyova
Marina Vasilyova - avatar
+ 2
I don't think these characters belong to ASCIl set.
3rd Aug 2019, 3:28 AM
Manoj
Manoj - avatar
+ 1
Cout code?
2nd Aug 2019, 10:06 PM
Marina Vasilyova
Marina Vasilyova - avatar
+ 1
Cout You can actually do it like you did, though the problem is that some console can't recognize non-ASCII character
2nd Aug 2019, 10:43 PM
Agent_I
Agent_I - avatar
+ 1
Cout I guess there's nothing much you can do except changing the console to a console which supports non-ASCII character
2nd Aug 2019, 10:59 PM
Agent_I
Agent_I - avatar
+ 1
Martin Taylor I am already on it. Thanks anyway.
3rd Aug 2019, 2:13 PM
Cout
Cout - avatar
0
Maria Vasilyova it's not working
2nd Aug 2019, 10:06 PM
Cout
Cout - avatar
2nd Aug 2019, 10:07 PM
Cout
Cout - avatar
0
Agent_I yeah that's why I can't
2nd Aug 2019, 10:51 PM
Cout
Cout - avatar
0
Agent_I the amount of time that people told me "that's impossible" in programming, is equivalent of the time I proved them wrong
3rd Aug 2019, 1:29 AM
Cout
Cout - avatar
0
Cout So the point of you telling me this is?
3rd Aug 2019, 2:42 AM
Agent_I
Agent_I - avatar
0
Agent_I the point of me telling you this is because you are wrong, and you should never say it
3rd Aug 2019, 10:37 AM
Cout
Cout - avatar
0
Cout I never said it's impossible, I said that it's hard to be done if you want to stick to the output console which doesn't support non-ASCII character. I know that anyone can modify any program however they want as long as they know how it works. Let me give you this analogy, you want to write a biography about yourself in Hebrew, but you can't write a book, so you ask your friend who is a writer to help you out. However, he doesn't know anything about Hebrew. So you have two options, you can either teach your friend Hebrew until he understand it, which will cost time and energy no matter how good you are at teaching, or you can find another writer who already understand it. Now, if you want to stick with Sololearn playground, go ahead, but I can't help you with that. The choice is yours, why hurt yourself?
3rd Aug 2019, 11:17 AM
Agent_I
Agent_I - avatar