DATA Step, Macro, Functions and more

How to read Russian Text in SAS

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

How to read Russian Text in SAS

Hello SAS users,

 

I have an excel file with Russian text in it. After importing XLS to SAS dataset, the Russian text looks like "???????????????????????" (series of question marks, separated by space or dash)

 

How can i import Excel file without this issue and retain original Russian text?

 

Thanks in advance.

 


Accepted Solutions
Solution
a month ago
Community Manager
Posts: 3,432

Re: How to read Russian Text in SAS

Make sure that you are running SAS with UTF-8 encoding.  The default (Latin encoding) won't support the Russian characters, but UTF-8 should preserve them. 


See this SAS Note for help.  If running in a centralized environment, a SAS admin might need to assist.

 

Also, you didn't say what method you're using for import.  I suggest PROC IMPORT with DBMS=XLSX, but different methods may have different behaviors around the encoding behaviors.

View solution in original post


All Replies
Solution
a month ago
Community Manager
Posts: 3,432

Re: How to read Russian Text in SAS

Make sure that you are running SAS with UTF-8 encoding.  The default (Latin encoding) won't support the Russian characters, but UTF-8 should preserve them. 


See this SAS Note for help.  If running in a centralized environment, a SAS admin might need to assist.

 

Also, you didn't say what method you're using for import.  I suggest PROC IMPORT with DBMS=XLSX, but different methods may have different behaviors around the encoding behaviors.

New Contributor
Posts: 4

Re: How to read Russian Text in SAS

Posted in reply to ChrisHemedinger

Thanks Chris. I tried PROC IMPORTand INFILE statement both. But as u suggested I will stick with PROC IMPORT.

 

Referring your steps - Not able to locate "sasv9.cfg" file on SAS APP Server. I don't even see SAS Home Folder. Suggestion?

 

Community Manager
Posts: 3,432

Re: How to read Russian Text in SAS

If you have a SASApp, that means you're working with a central SAS workspace.  The config file is in ../Config/Lev1/SASApp/sas9_usermods.cfg.  You would add a statement like: 

 

-config "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8\sasv9.cfg"

 

(On Linux, this is usually "/opt/sas/config/lev1...")

 

Again, might need an admin to help.

New Contributor
Posts: 4

Re: How to read Russian Text in SAS

Posted in reply to ChrisHemedinger

Thanks Chris for your help! I was able to read Russian text after editing "sasv9.cfg" file.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 100 views
  • 0 likes
  • 2 in conversation