All pastes #897975 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-09 23:33 UTC
rendered paste body
public 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;
	}
}