±Û¾´ÀÌ :À±°æ±¸ 1999³â 6¿ù 21ÀÏ 09:46:16
In Reply to: URLEncoder posted by ±èÀÀ¼· on 1999³â 6¿ù 19ÀÏ 22:02:52:
¸ÅŲÅä½Ã¶ó¸é ÀÚ¹ÙÀÇ ÇÑ±Û È¯°æ Áö¿øÀÌ À©µµ¿ì³ª
À¯´Ð½º¿Í´Â Á¶±Ý ´Ù¸¦ °Í °°±º¿ä.
ÇÑ±Û À©µµ¿ì³ª À¯´Ð½ºÀÇ ko_KR ·ÎĶ°ú °°ÀÌ
±âº» ÀÎÄÚµùÀ» EUC_KRÀ̳ª CP949(ȤÀº MS949) Á¤µµ·Î ÀνÄÇØÁÖ´Â
°æ¿ì¿¡´Â ±×³É URLEncoder.encode()¸¦ »ç¿ëÇÏ¸é µÇ´Âµ¥
¾Æ´Ñ °æ¿ì¿¡´Â ÀÎÄÚµùÇÏ´Â ·çƾÀ» ¸¸µé¾î¾ß Çϰڳ׿ä.
class A {
public static void main(String args[]) throws java.io.UnsupportedEncodingException {
String a="ÇÑ";
// System.out.println(java.net.URLEncoder.encode(a));
byte[] bytes=a.getBytes("EUC_KR");
for (int i=0; i< bytes.length; i++)
System.out.println("value["+i+"]="+Integer.toHexString(bytes[i]&0xFF));
}
}