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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1259 views
  • 1 like
  • 3 in conversation