stata15中文亂碼處理——轉自連玉君老師碼雲


1. ua 命令

適用於 stata15 用戶。可以一次性對當前工作路徑以及所有子文件夾中的文件進行轉碼(unicode),以保證中文字符可以正常顯示。

安裝

下載 ua.ado 和 ua.hlp,放置於 D:\stata15\ado\base\u 或 D:\stata15\ado\plus\u 文件夾中。

使用

  • 在 Stata 命令窗口中輸入 help ua,查看命令介紹和 Stata 范例。參照范例使用即可。

Stata 范例


 * 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 * 

2. uall 命令

Description

uall is shortcut for help ua.

It executes the following two commands:

  . ua: unicode encoding set gb18030
 . ua: unicode translate *

Syntax

  • Short version (Chinese only):
     . uall
  • Full version:
     . uall [encoding-name]
  • encoding-name is the name of encoding, see the list of encodings.
  • The default is gb18030 for Chinese. So, for Chinese user, you need not specify this option.

Examples

  * Change current working directory (CWD)
 . cd D:\stata15\ado\personal\mypaper   * For Chinese users:  . uall   * For Japnese users:  . uall ibm-943_P15A-2003   * For Korean users:  . uall ibm-970_P110_P110-2006_U2

Author


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM