±Û¾´ÀÌ :°í°æȯ 1998³â 1¿ù 12ÀÏ 13:33:40
String unicodeHangul = "À¯´ÏÄÚµå ½ºÆ®¸µ...";
byte[] rawHangul = unicodeHangul.getBytes("KSC5601");
À§¿Í°°ÀÌ Çϸé KSC5601·Î º¯È¯µÈ byte[]¹è¿À» ¾òÀ»¼öÀÖÁö¿ä.
±×·³ sql¹®À» ¸¸µé±âÀ§¿¡ byte[]À» StringÀ¸·Î º¯È¯ÇؾßÇѴ´ë
StringÀ¸·Î º¯È¯ÇÏ¸é ´Ù½Ã À¯´ÏÄÚµå·Î º¯È¯ÇÏÁö¾Ê½À´Ï±î
mssql¿¡¼´Â ÇѱÛÀÌ ±úÁ®¿ä
´Ù¸¥¹æ¹ý(StringÀ» »ç¿ëÇÏÁö¾Ê°í)À¸·Î sql¹®À»¸¸µé¼ö´Â ¾ø³ª¿ä!
ex)
String query = "inset into...."
byte[] Hangul = query.getBytes("KSC5601");
String s =new String(rawHangul, "KSC5601");
stmt.executeQuery(s);