0
How can I use Chinese in java by sololearn?
I am a beginner form China,and my English is poor,so I want to output my codes by Chinese for now. Another question is: it is said that Java uses 16-bit coding,which supports all country's languages,but why I can't use Chinese in Java by sololeran directly? You can run my code for more information. Thanks guysđ https://code.sololearn.com/c41ryNL8k0IF/?ref=app
8 Respostas
+ 2
Jax Yang you asked for example here is one :
https://code.sololearn.com/cv7Elp6RkruK/?ref=app
+ 1
I guess you may be speak Chinese, so I found a Chinese website. This may help you. https://dotblogs.com.tw/alantsai/2014/01/21/java_encoding
+ 1
look for 'java internationalization' , but it still does not guarantee the result on sololearn
+ 1
zemiak I have looked for the key words you give, limited to knowledge, I still have no idea.
Maybe it's just because sololearn don't support.
If the means exists, please give me an example.
+ 1
Daljeet Singh nice! I have marked.
But it's more troublesome than expected. I think I'd better spend more time to learn English.
And most importantly,thanks.
+ 1
// similar example but simpler
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
public class TestClass {
public static void main(String [] args) throws UnsupportedEncodingException {
String str = ("\u4e16\u754c\u4f60\u597d\uff01");
System.setOut( new PrintStream(System.out, true, "UTF-16") );
System.out.println( str); // "äžçæšć„œ!"
}
}
0
CarrieForle I have read the article your website present,but it seems that we can't personalize the compiler in sololearn.
BTY, I also use PC for coding,and the code above runs perfectly on my PC.
So I think the key is sololearn's settings.
0
zemiak It's a good lesson, thanks