서버 -> 클라이언트
String sText = "";try { sText = new String(data, 0, data.length, "euc-kr");} catch (UnsupportedEncodingException e) {}
이 함수를 사용하여 해결했는데
클라이언트 -> 서버
이럴경우 서버에서는 한글이 깨집니다.
utf-8 로 변형해서 전송도 해봤는데 역시 깨집니다
서버는 Java 입니다.
로그인 유지
InputStream in = null;
String content = "";
int size;
byte[] buffer = new byte[10240];
in = socket.getInputStream();//스트림얻기
// 수신대기
size = in.read(buffer);
//통신종료
if(size <=0 ) throw new IOException();
//읽기
content = new String(buffer,0,size,"UTF-8");