2
votes

How to change default encoding for internal processing of data in SAS? It is currently wlatin1 but I want UTF-8 as the default encoding.

3
possible duplicate of Encoding Issue SAS 9.3 - Ajay Ohri

3 Answers

1
votes

Do You want to change encoding for SAS session? You can specify the ENCODING= system option in a configuration file or at SAS invocation.

change SAS encoding for Base SAS sessions

You can also change encoding for SAS tables in infile statement etc.

change SAS enconding

0
votes

SAS should install (as of 9.3) at least two language options in addition to your default language. It should install a "Unicode Support" version (which is UTF-8) and a "DBCS" version (for Chinese/Japanese/etc. code pages).

Open the Start Menu, navigate to SAS, then open the "Additional Languages" folder, which should include these. If they weren't installed properly (and you have to intentionally not install them starting with 9.3, so they probably are installed), ask your local SAS admin to re-install SAS with these. SAS Start Menu Picture

If you don't have Windows, you may still have these. Look in your SAS Home folder, then:

%sashome%/sasfoundation/9.3/nls/

That will have subfolders for each installed language; I have en, u8, and 1d (for DBCS). These each have pre-built config files for their appropriate code pages. Use the appropriate config file (with then modifications made for your environment as needed).

0
votes

Just add this entry to your SAS9.cfg file:

-ENCODING utf-8