nkf

Convert between different Japanese character encodings (Shift_JIS, EUC-JP, UTF-8)

brewmacoslinux
Try with needOr install directly
Source

About

Network Kanji code conversion Filter (NKF)

Commands

nkf

Examples

Convert Shift_JIS encoded file to UTF-8$ nkf -w file.txt > file_utf8.txt
Convert UTF-8 file to Shift_JIS encoding$ nkf -s file.txt > file_sjis.txt
Detect the encoding of a file$ nkf -g file.txt