Re: [問題] 在Java Applet中顯示日文
請問一下,我現在文字檔案內容是
ezpage.mainmenu=\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc
用UTF-8格式儲存檔案(ANSI也試過),取得字串方式
main_menu_str = resource.getString("ezpage.mainmenu");
是Applet用IE開啟
顯示出來都是方框,是否這樣作法有何錯誤
請問有人知道該如何在Applet上顯示出日文嗎?
謝謝
※ 引述《jawwoeima (RYAN)》之銘言:
: 想請問一下,如何在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
※ 編輯: jawwoeima 來自: 59.124.42.161 (05/03 18:28)
※ 編輯: jawwoeima 來自: 219.87.143.180 (05/04 10:26)
→
05/04 15:25, , 1F
05/04 15:25, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):