Tiny tutorial on how to run apps requiring Japanese locale

Questions about Wine on Linux
Locked
z-s-e
Level 1
Level 1
Posts: 6
Joined: Tue Jun 13, 2017 6:02 am

Tiny tutorial on how to run apps requiring Japanese locale

Post by z-s-e » Tue Jun 13, 2017 6:34 am

Hi,

I found a nice easy solution to run apps needing Japanese locale to display correctly that doesn't need root/sudo (or any kind of changes to the system for that matter), so I wanted to share it. Some notes first:
  • this was tested under Kubuntu 17.04, but I don't think this is distro specific
  • I had better luck using the w32 arch (so I advise creating a wine environment with "env WINEARCH=win32 winecfg" first)
  • use winetricks to install ckjfonts
On to the tutorial: We need a directory to store the locale info, here I use $HOME/.wine/locale-ja/ but you can use whatever you like. In a console, do the following:

Code: Select all

export LOCPATH=$HOME/.wine/locale-ja/
mkdir -p $LOCPATH
localedef -f EUC-JP -i ja_JP $LOCPATH/ja_JP.EUC-JP
localedef -c -f SHIFT_JIS -i ja_JP $LOCPATH/ja_JP.SJIS
You get a warning that SHIFT_JIS is not ASCII compatible, that is normal. With that setup you can now run apps using

Code: Select all

env LOCPATH=$HOME/.wine/locale-ja/ LANG=ja_JP.SJIS wine prog.exe
or if the app is using EUC-JP (less common afaik)

Code: Select all

env LOCPATH=$HOME/.wine/locale-ja/ LANG=ja_JP.EUC-JP wine prog.exe
Enjoy :) I actually had this working better than using real Windows (where setting up the correct locale is a hassle) which is awesome.

Locked