java

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ java ] in KIDS
글 쓴 이(By): unme (복숭아 )
날 짜 (Date): 2001년 5월  9일 수요일 오전 02시 17분 19초
제 목(Title): 질문]영문 OS에서 애플릿실행시 한글깨짐..


한글 OS에서 한글처리를 해서 한글이 깨지지 않고 잘 보였습니다.
영문 OS 에 놓고 애플릿을 실행시켰더니 글자들이 네모 상자처럼 한글이 깨져 
나옵니다.
다른 웹사이트의 한글은 잘 읽는것 같던데 왜 애플릿에서 한글이 깨지는지 
알수가 없네요. 고수님들의 관심 부탁합니다.

jdk 1.3, win98, tomcat, jBuilder를 사용하고 있음다.
다음은 소스� 파일입니다. 함 봐주세요...

import java.io.*;
import java.net.*;
import java.util.*;

public class CustomProperty
{
Locale currentLocale;
ResourceBundle messages;
CustomConfig cf ;
String lang;
String country;

public CustomProperty(String propFileNm)
{
try
{
cf = new CustomConfig();
lang = cf.getConfig("lang");
country = cf.getConfig("country");
String path = "/include/";

if ( lang != null && country != null )
currentLocale = new Locale(lang,country);
else
currentLocale = new Locale("en","US");

messages = ResourceBundle.getBundle(path + propFileNm, currentLocale);
}
catch (Exception e)
{
System.err.println("Can't read the properties file. " +
"Make sure CustomProperty.properties is in classes.");
}

}

public String getContents(String str)
{
if (messages != null)
{
System.out.println("customProperty=>"+messages.getString(str));
if (lang != null && lang.equals("ko"))
{
try {
return new String(messages.getString(str).getBytes("8859_1"),"KSC5601");
}catch (UnsupportedEncodingException uee){
System.err.println("Can't read the properties file. " +
"Make sure config.properties is in classes." + uee.toString());
return null;
}
}
else
return messages.getString(str);
}
else
return null;
}
}
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.