/**
     * 8859_1 -> UTF-8로 변환
     *
  * @param String str
  * @return String
     */
 public static String toKor(String str) {

  if(str == null) return null;

  String rtValue = null;
  try {
   rtValue = new String(str.toString().getBytes("8859_1"), "UTF-8");
  } catch(java.io.UnsupportedEncodingException e) {
   e.printStackTrace();
  }
  return rtValue;
 }

by 가르니아코코넛 2013. 3. 15. 15:57
| 1 |