Skip to content

Instantly share code, notes, and snippets.

@CurtisNewbie
Created April 16, 2020 15:14
Show Gist options
  • Save CurtisNewbie/0fa6cec6303352798a4bd23d2c65e213 to your computer and use it in GitHub Desktop.
Save CurtisNewbie/0fa6cec6303352798a4bd23d2c65e213 to your computer and use it in GitHub Desktop.

微信中文解决办法

在微信无法显示中文的情况,可以通过增加字体和设 Lang variable 的方式来解决。

具体看:https://askubuntu.com/questions/1019530/chinese-fonts-are-not-visible-in-programs-installed-in-wine

如果可以显示中文,但是输入框无法显示正在输入的文字或内容,则需要添加 dll 文件来解决。

具体看:https://zhuanlan.zhihu.com/p/76331687

下列解决方法应该是需要关闭 wine 和微信的。

添加中文字体

1. 进入路径: ~/.wine/drive_c/windows/Fonts/

2. 添加字体: 放置任何 .ttc文件的中文字体, 例如 wqy-microhei.ttc字体(在下面这个repo里面)

    https://github.com/anthonyfok/fonts-wqy-microhei

设置Lang variable

这个 Lang 变量某种程度上就是告诉 wine,用中文的编码来运行程序. 启动程序如下:

LANG=zh_CN.UTF-8 wine WeChat.exe

添加dll

添加 dll 时需要用到 winetricks.

1. 进入到drive_c的上一层路径 (我的情况是 "~/.wine/")
2. 运行winetricks如下:

    WINARCH=win32 WINEPREFIX=~/.wine/ winetricks

3. 选择使用默认wine容器 (select the default wineprefix)
4. 选择添加windows dll (install a windows dll or componenet)
5. 找到并选上 riched20 和 riched30, 选择ok. 然后程序会自动添加dll.
6. 退出winetricks 然后重开微信就可以了。

Alias

# alias
alias wechat='LANG=zh_CN.UTF-8 wine /home/yongjie/.wine/drive_c/Program\ Files\ \(x86\)/Tencent/WeChat/WeChat.exe'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment