BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sumit
Calcite | Level 5

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
sumit
Calcite | Level 5

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?

 

ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
sumit
Calcite | Level 5

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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