Tuesday, March 30, 2010

Convert Native to Ascii

Run below batch script in command prompt:-

native2ascii -encoding UTF-8 chinese.txt messages.properties

p/s: no need install any software

**********
Sample Content: chinese.txt

prompt.OldPassword=請輸入 [舊密碼]
prompt.NewPassword=請輸入 [新密碼]
prompt.ConfirmPassword=請輸入 [確認密碼]
prompt.PasswordLength=請輸入6-8位數字的 [新密碼]

***********
Sample Output: message.properties

prompt.OldPassword=\u8acb\u8f38\u5165 [\u820a\u5bc6\u78bc]
prompt.NewPassword=\u8acb\u8f38\u5165 [\u65b0\u5bc6\u78bc]
prompt.ConfirmPassword=\u8acb\u8f38\u5165 [\u78ba\u8a8d\u5bc6\u78bc]
prompt.PasswordLength=\u8acb\u8f38\u51656-8\u4f4d\u6578\u5b57\u7684 [\u65b0\u5bc6\u78bc]

No comments: