๐น๐๐๐
[JAVA] request.setCharacterEncoding() ์ด ์ ๋ ๋ : unhandled exception type UnsupportedEncodingException
ํด๋ฒ๋
2023. 10. 25. 22:09
๋ฐ์ํ
ํ๊ธ์ ๋ฃ๊ณ ์ถ์ด์
request.setCharacterEncoding("euc-kr");
์ ๋ฃ์๋๋ฐ ๋นจ๊ฐ์ค์ ๋ง๋ฌ๋ค.
try-catch๋ฌธ์ ๋ฃ์ด์ฃผ๋ฉด ๋๋ค.
try{
request.setCharacterEncoding("UTF-8");
} catch(Exception e){
e.printStackTrace();
}
์ด๋ฐ์์ผ๋ก try-catch ๊ตฌ๋ฌธ์ ๋ฃ์ด์ฃผ๋ฉด ๋๋ค.
๋ฐ์ํ