- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello Everybody. I have an issue with encoding. I have more than one datasets that need to be encoded. My code working only for one dataset. If you know how to fix this let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you need to deal with characters strings that use many different encodings then make sure your SAS session is using UTF-8 as the session encoding. Check the system option ENCODING.
The session encoding needs to be set before SAS starts. So if you running from command line make sure to use command (or windows "icon") that uses the UTF-8 encoding. Sometimes called "unicode support". If you are using Enterprise Guide or SAS/Studio to submit code to SAS then make sure the application server you are connecting to is using UTF-8 encoding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Determine the Encoding of your input Data Set
You can use PROC CONTENTS to determine the encoding of your data set.
The following code displays information about the data set header:
proc contents data=sashelp.class;
run;
Also, see here (the 3rd bullet has all the code needed) :
- National Language Support (NLS)
Migrating Data to UTF-8
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n0r50qvm0nmmoyn1neo7nb1tfpl2.htm - Migrating Data from WLATIN1 to UTF-8
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n15e31tqdv020en1fok7tp4l9zd5.htm - Data Migration
Migrating to UTF-8
Migrating Data to UTF-8 for SAS® Viya® 3.5
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/viyadatamig/titlepage.htm
Koen