Mine
public text v1 · immutablepublic class EncodingHelper {
/**
* use for windows only, this method is use for workaround encoding problems on windows.<br>
* any suggestion are welcomed
*
* @return the string in utf-8 for solR
*/
public static String toUTF8(String string) {
String utf8 = "";
try {
utf8 = new String(string.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
throw new RuntimeException("can not change String Encoding");
}
return utf8;
}
}