背景:為了支持國際化內容,在 eclipse中添加properties文件國際化文件,添加中文,但是用記事本打開,發現還是中文,並沒有出現\uxxx形式的內容
解決:eclipse添加properties插件PropertiesEditor
步驟:
2、將得到的文件直接解壓,將該文件夾復制到 Eclipse目錄下覆蓋插件文件夾(注意目錄)
左側為eclipse根路徑,右側為壓縮包文件夾路徑,將右側內容解壓或復制到左側
3、重啟Eclipse。
4.1、菜單欄->Window->Preferences->General->Editors->File Associations,
選中 *.properties 文件(沒有的話,點擊Add添加一個*.properties),
4.2、將PropertiesEditor設為默認的打開方式
下方的 Associated editors 欄里有 PropertiesEditor 項,選中,點擊 Default 按鈕。
雙擊properties文件默認就會用PropEditor打開了。
如果之前的properties文件用記事本打開沒有變成\uxxx的形式,重新編輯下文件內容並保存。