Chinese character encoding in openshift 4 using java

87 Views Asked by At

I am unable to use chinese string as a file name in java. It is working as expected in local but when deployed in OpenShift, it is not encoding properly and appearing as ?????.

Code I have used for storing the Chinese characters.

String nonEnglishString = "你好,世界!";
String u = new String(nonEnglishString.getBytes(), "UTF-8");

I also tried this below environment variables in OpenShift.

LANG: UTF-8

But both of the approach are not working in OpenShift 4.

0

There are 0 best solutions below