Convert Chinese to Unicode or reverse with native2ascii or uni2ascii on FreeBSD

 

Use  uni2ascii

Install uni2ascii 
# pkg install uni2ascii 
 
Converting Chinese to Unicode:
% uni2ascii -a U chinese.txt  > unicode.txt
 
Converting Unicode to Chinese:
% ascii2uni -a U unicode.txt  > chinese.txt
 

Use native2ascii

Converting Chinese  to Unicode:
% native2ascii -encoding GBK  chinese.txt unicode.txt

Converting Unicode to Chinese:
% native2ascii -reverse -encoding GBK unicode.txt chinese.txt

native2ascii is a tool of JDK, you need to install JDK first if you want to use native2ascii.

 


Comments

Popular posts from this blog

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

How To Install Nginx, MySQL and PHP (FEMP) Stack on FreeBSD 13.0

Install samba on FreeBSD(on VMware Workstation) to share files with Window.