2017-03-08 19 views
0

如何在讀取SAS中的文件時處理UTF-8字符?如何在讀取SAS中的文件時處理UTF-8字符?

例如西班牙語字符,如ó之間UTF-8內的其它特殊的字符,以便它不顯示垃圾字符串等

é代替é

+0

尼斯Q&A,但你可能要包括一些額外的信息。它看起來像你在企業指南中運行這個,對吧?而且您可能需要驗證您的SAS是否在Unicode兼容模式下運行才能完全正常工作。 – Joe

回答

1

簡單的方法I Eá實現這一目標是右擊你的文件的元數據的步驟 - >屬性

enter image description here

文件參數 - >高級

enter image description here

現在鍵入UTF-8編碼選項。按OK,它應該爲該文件啓用。

enter image description here

0

SAS Documentation

要指定讀取外部文件時使用的編碼,指定ENCODING=選項:

libname myfiles 'SAS data-library';   
filename extfile 'external-file' encoding="utf-8"; 

data myfiles.unicode;                               
    infile extfile;                          
    input Make $ Model $ Year;                           
run; 
相關問題