BookmarkSubscribeRSS Feed
Liamb
Obsidian | Level 7

Hello,

 

I imported an excel file with a column containing Kazakh (+++) and other languages (Russian, English) and I get this warning message "Some character data was lost during transcoding in column". My column values beyond those in English have all been changed. How can I solve this issue?

 

Thanks

Best regards,

7 REPLIES 7
SASKiwi
PROC Star

Check your SAS session encoding setting:

proc options option = encoding;
run;

Usually session encoding needs to be set to UTF-8 to handle multiple languages.

Liamb
Obsidian | Level 7

Please see below the output I get :

proc options option=encoding;
 run;

SAS (r) Proprietary Software Release 9.4 TS1M6

ENCODING=WLATIN1 Specifies the default character-set encoding for the SAS session.

How can I changes that to UTF-8?

 

Thanks

SASKiwi
PROC Star

Unfortunately this can only be done for the whole SAS session so needs to be set when starting SAS. Do you use SAS on your PC or a remote SAS server? If it is the latter then only a SAS administrator can deal with that.

Liamb
Obsidian | Level 7
I use SAS on my PC.
SASKiwi
PROC Star

Locate the sasv9_usermods.cfg file in your PC's SAS Home directory and add this line:

-ENCODING UTF-8

Start a SAS session and check your ENCODING option again.

Ksharp
Super User
filename x 'c:\temp\x.csv' encoding='utf8' ;
proc import datafile=x out= ...............
Liamb
Obsidian | Level 7

Sorry for my late reply

I did not have the authorizations to modify the sasv9_usermods.cfg file and if I convert my Excel file to CSV I lose my values written in Kazakhe. Finally, I used SAS Unicode supported to process my data file

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 7 replies
  • 908 views
  • 1 like
  • 3 in conversation