package kr.co.kihyun.lang;

import java.io.UnsupportedEncodingException;

public class Encoder {
	public static String toKR(String str) throws UnsupportedEncodingException {
		if (str == null)
			return "";
		return str;
	}

	public static String toUni(String str) {
		String result = "";
		if (str == null)
			return "";
		result = str;
		return result;
	}

	public static String toISO(String str) throws UnsupportedEncodingException {
		if (str == null)
			return "";
		return str;
	}

	public static String toUTF8(String str) throws UnsupportedEncodingException {
		if (str == null)
			return "";
		return str;
	}

	public static String toKSC(String str) throws UnsupportedEncodingException {
		if (str == null)
			return "";
		return str;
	}

	/**
	 * 데이터 베이스에 문자열 넣을때 Encoder 변환
	 */
	public static String toDB(String str) {
		try {
			if (str == null)
				return "";
			return str;
		} catch (Exception e) {
			return str;
		}
	}

	/**
	 * 데이터 베이스에서 문자열 읽을때 Encoder 변환
	 */
	public static String toJava(String str) {
		try {
			if (str == null)
				return "";
			return str;
		} catch (Exception e) {
			return str;
		}
	}

	public static String toEUCKR(String str) {
		try {
			if (str == null)
				return "";
			return str;
		} catch (Exception e) {
			return str;
		}
	}
}
