新裝的wine中文全是亂碼,需要修改一下幾個配置檔案,找到一篇比較詳細的配置說明,分享一下:
步驟:
1. 初始設定
執行 winecfg,把模擬的 windows 系統設定為 windows xp 或者 windows 2000。
2. 準備字型
為了讓 windows 應用程式看上去更美觀,所以需要 windows 下面的字型。
由於我已經將 simsun.ttc 複製到 /usr/share/fonts/windows/ 目錄中了。所以我只需要在 ~/.wine/drive_c/windows/fonts/ 目錄中為 simsun.ttc 建立乙個符號連線:
cd ~/.wine/drive_c/windows/fonts
ln -s /usr/share/fonts/windows/simsun.ttc simsun.ttc
ln -s /usr/share/fonts/windows/simsun.ttc simfang.ttc
建立乙個 simfang.ttc 是許多 windows 應用預設使用 simfang.ttc 字型。
3. 修改 ~/.wine/system.reg
裝好字型後,還要修改一下 wine 的登錄檔設定,指定與字型相關的設定:
gedit ~/.wine/system.reg
(一定要使用 gedit 或其他支援 gb2312/utf8 編碼的編輯器修改這些檔案,否則檔案中的中文可能變亂碼)
搜尋: logpixels
找到的行應該是:[system\\currentcontrolset\\hardware profiles\\current\\software\\fonts]
將其中的:
"logpixels"=dword:00000060
改為:"logpixels"=dword:00000070
搜尋: fontsubstitutes
找到的行應該是:[software\\microsoft\\windows nt\\currentversion\\fontsubstitutes]
將其中的:
"ms shell dlg"="tahoma"
"ms shell dlg 2″="tahoma"
改為:"ms shell dlg"="simsun"
"ms shell dlg 2″="simsun"
4. 修改 ~/.wine/drive_c/windows/win.ini
gedit ~/.wine/drive_c/windows/win.ini
在檔案末尾加入:
[desktop]
menufontsize=13
messagefontsize=13
statusfontsize=13
icontitlesize=13
5. 最關鍵的一步,網上很多文章中沒有提到的一步──把下面的**儲存為zh.reg,然後終端執行
regedit zh.reg
regedit4
[hkey_local_machine\software\microsoft\windows nt\currentversion\fontsubstitutes]
"arial"="simsun"
"arial ce,238"="simsun"
"arial cyr,204"="simsun"
"arial greek,161"="simsun"
"arial tur,162"="simsun"
"courier new"="simsun"
"courier new ce,238"="simsun"
"courier new cyr,204"="simsun"
"courier new greek,161"="simsun"
"courier new tur,162"="simsun"
"fixedsys"="simsun"
"helv"="simsun"
"helvetica"="simsun"
"ms sans serif"="simsun"
"ms shell dlg"="simsun"
"ms shell dlg 2"="simsun"
"system"="simsun"
"tahoma"="simsun"
"times"="simsun"
"times new roman ce,238"="simsun"
"times new roman cyr,204"="simsun"
"times new roman greek,161"="simsun"
"times new roman tur,162"="simsun"
"tms rmn"="simsun"
再winecfg,就可以看到中文能正常顯示了.
解決ubuntu wine很慢的問題
加快 ubuntu wine 速度由於 x locale 的問題,預設 wine 會輪詢 x core fonts 使得 ubuntu wine 很慢,請先執行 sudo sed i e gbk d usr share x11 locale zh cn.utf 8 xlc locale 如果發現wi...
qt 中文亂碼 Qt中文亂碼問題
接觸了qt,由於習慣中vs,如果使用vs寫qt 剛接觸很快就發現有中文亂碼問題,我的解決方法如下 新建乙個標頭檔案,比如qtchcharset.h,標頭檔案中內容如下 pragma once ifdef q os win q os win 新增後支援gb2312,utf 8 bom,unicode ...
中文亂碼的處理
專案環境設定 伺服器處理jsp檔案字符集設定 工作空間檔案字符集設定 get提交字符集設定 使用new string 重構字串 在server.xml檔案中設定uriencoding post提交字符集設定 使用new string 重構字串 使用request.setcharaencoding 設...