Why doesn't SL's code playground support unicode characters, while most others do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why doesn't SL's code playground support unicode characters, while most others do?

SoloLearn's code playground supports python 3. And most of the python3 interpreters directly support unicode characters. But why doesn't SoloLearn's code playground do the same? Why doesn't it support the unicode characters?

11th Oct 2019, 7:52 AM
Ishmam
Ishmam - avatar
5 Answers
+ 6
I think it will work, but just try it with this code snippet: # code from cbr #Add this to the beginning of the code: import sys import codecs sys.stdout = codecs.getwriter('utf_16')(sys.stdout.buffer, 'strict') print("äöüß дЍΏ") # this line is for test only, you can add your own characters here to test
11th Oct 2019, 9:25 AM
Lothar
Lothar - avatar
+ 2
Ok, that might be. But the fact that one online compiler supports it doesn't mean the other one supports it, too. I just don't think it's the interpreters fault so I assume it's caused by the file type that's send to the servers...
11th Oct 2019, 8:25 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 2
I believe I have seen some codes written to output UTF characters (in terms of emoji), maybe you can search them in Code Playground. Or perhaps you meant something else?
11th Oct 2019, 8:58 AM
Ipang
+ 1
Maybe because they send the code to their servers as simple ASCII text file or something. The Python interpreter itself will certainly support unicode but as I said it must be sent to a server first.
11th Oct 2019, 8:00 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 1
I tried from Dcoder. It is also a online compiler. And it supports unicode characters.
11th Oct 2019, 8:20 AM
Ishmam
Ishmam - avatar