看板 java 關於我們 聯絡資訊
想請問一下,如何在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
PsMonkey:properties 應該要用 \u 的方法儲存吧? 05/03 17:51
pico2k:檢查一下瀏覧器的頁面語言設定是否為UTF-8... 05/03 17:57