HttpClient 4.0 Post 방식 한글깨짐

Post Method 로 한글 데이터를 전송하니 깨져서…
구글신의 도움을 받아.

HttpPost httpost = new HttpPost("http://coozplz.blogspot.com"); 
List nvps = new ArrayList();
nvps.add(new BasicNameValuePair("MESSAGE", "안녕하세요"));
httpost.setEntity(new UrlEncodedFormEntity(nvps, "euc-kr"));
httpost.setHeader("Content-type", "application/x-www-form-urlencoded");
HttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(httpost);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s