[問題] 在Java Applet中顯示日文
想請問一下,如何在Applet中
顯示日文,我的messages_ja.properties是用UTF-8存
內容為
# Message.properties
ezpage.mainmenu=メインメニュー
以下是我的code
private Locale locales = null;
private ResourceBundle resource = null;
try {
locales = new Locale("ja", "");
} catch (Exception e) {
System.out.println("[ERROR] : "+e.toString());
locales = Locale.getDefault();
}
ResourceBundle resource = ResourceBundle.getBundle("messages", locales);
// read string from properties file
String main_menu_str = resource.getString("ezpage.mainmenu");
但是main_menu_str 顯示出來都是亂碼
想請問是否我作法做錯了,該如何在Applet中顯示出日文
網路查了很久,都沒試出來,謝謝各位的回答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.124.42.161
推
05/03 17:51, , 1F
05/03 17:51, 1F
→
05/03 17:57, , 2F
05/03 17:57, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):