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

27th Aug 2019, 4:01 AM
Jax Young
Jax Young - avatar
8 odpowiedzi
+ 2
27th Aug 2019, 1:29 PM
Daljeet Singh
Daljeet Singh - avatar
+ 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
27th Aug 2019, 4:41 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
look for 'java internationalization' , but it still does not guarantee the result on sololearn
27th Aug 2019, 5:50 AM
zemiak
+ 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.
27th Aug 2019, 10:59 AM
Jax Young
Jax Young - avatar
+ 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.
27th Aug 2019, 2:38 PM
Jax Young
Jax Young - avatar
+ 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); // "世界您好!" } }
27th Aug 2019, 7:25 PM
zemiak
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.
27th Aug 2019, 10:48 AM
Jax Young
Jax Young - avatar
0
zemiak It's a good lesson, thanks
28th Aug 2019, 3:06 AM
Jax Young
Jax Young - avatar