help ua

Title

ua -- unicode all, Prefix command for unicode utilities

Syntax

ua : unicode_command

where, unicode_command can be any command supported by [D] unicode, including:

[D] unicode translate Translate files to Unicode

[D] unicode encoding Unicode encoding utilities

[D] unicode locale Unicode locale utilities

[D] unicode collator Language-specific Unicode collators

[D] unicode convertfile Low-level file conversion between encodings

Description

Stata's official command unicode translate can translate
files containing extended ASCII (such as accented characters, Chinese,
Japanese, or Korean (CJK) characters, Cyrillic characters, and the like)
to Unicode (UTF-8). For other similar commands, see [D] unicode.

However, only files in current working directory (CWD) can be done with unicode command families.
For users of Stata 13 and earlier, especially old users with many files saved in different
folders and sub-folders, it is a time-consuming task to translate unicode.

ua (unicode all) help you get out of the mess!

ua is a prefix command (see prefix)
to unicode commands. It provides an easy way to
unicode files in CWD and files in all subdirectories of CWD recursively.

Warning

We recommend you read unicode, and for safety, backup your files and do some tests before you use ua.

Examples

* Change current working directory (CWD)

. cd D:\stata15\ado\personal\mypaper

* Unicode all .dta files in CWD and files in sub-directories

. ua: unicode encoding set gb18030

. ua: unicode translate *.dta

* Unicode all files (.do, .ado, .dta, .hlp, etc.) in CWD and files in sub-directories

. ua: unicode encoding set gb18030

. ua: unicode translate *

Author

Yujun,Lian (Arlion) Department of Finance, Lingnan College, Sun Yat-Sen University.

E-mail: arlionn@163.com.

Blog: http://www.jianshu.com/u/69a30474ef33.

Acknowledgements

I would like to thank Dr. Hua Peng at StataCorp LP for helpful suggestions.

Codes from rcd by Nikos Askitas and Dan Blanchette have been incorporated.

Also see

Online: help for unicode, rcd