思路
- 根据我的经验,从国泰安下载的txt数据一般是用“UTF-16”编码,如图所示:
image.png
- 需要转成“UTF-8”才能被Stata正常导入。
步骤
- 直接用系统自带的文本编辑器打开文件:
image.png
- 按“Comman + Shift + S”,此时文本编辑器复制一份副本在系统缓存中:
image.png
- 点击左上角红点,此时会弹出如下对话框
image.png
- 点击【纯文本编码】右侧的下拉菜单,选择Unicode(UTF-8):
- 保存,完毕。
<a href="https://www.hitwebcounter.com" target="_blank">
<img src="https://hitwebcounter.com/counter/counter.php?page=7958476&style=0001&nbdigits=5&type=page&initCount=1076" title="Free Counter" Alt="web counter" border="0" /></a>