2020/02/26

[初心者學STATA]STATA14亂碼修正

若在Stata 14開啟Stata 13以前所儲存的正體中文檔案資料會出現亂碼
  1.  clear
  2.  cd "路徑" /*指定工作資料夾*/
  3.  ls  /*(選擇)列出檔案*/
  4.  unicode analyze "檔案名稱" 
  5.  unicode encoding set Big5     /*指定編碼格式,簡體檔案用gb18030、英文用unicode*/
  6.  unicode translate "檔案名稱"
   6.1. unicode translate *.dta         /*利用「*」直接轉碼工作資料夾中所有dataset*/
   6.2. unicode translate 檔案名稱.dta, invalid  /*無法轉換時強制轉檔*/


沒有留言:

張貼留言