Reputation: 576
How to handle UTF-8 characters when reading a file in SAS?
Such as spanish characters like ó í é á among other special characters within UTF-8 so it doesn't display garbage strings like
é instead of é
Upvotes: 0
Views: 3870
Reputation: 543
From SAS Documentation:
To specify which encoding to use when reading the external file, specify the ENCODING=
option:
libname myfiles 'SAS data-library';
filename extfile 'external-file' encoding="utf-8";
data myfiles.unicode;
infile extfile;
input Make $ Model $ Year;
run;
Upvotes: 0
Reputation: 576
The simple way to achieve this is Right click your file's metadata step -> Properties
File Parameters -> Advanced
Now type UTF-8 in the encoding options. Press OK and it should be enabled for that file.
Upvotes: 1