안드로이드 개발 질문/답변
(글 수 40,700)
안녕하세요. 다음과 같이 인터넷에서 정보를 받아오는데요...
한글을 출력하면 처참하게 깨져버리는군요...
어떻게 해야 한글을 정상적으로 출력할수 있을까요?
URLConnection connection;
InputStream is;
StringBuffer sb;
URI uri;
uri = new URI("---");
connection = uri.toURL().openConnection();
connection.connect();
is = connection.getInputStream();
int ch;
sb = new StringBuffer();
while( ( ch = is.read() ) != -1 ) {
sb.append( (char)ch );
}
temp=sb.toString();