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
Opal | Level 21

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
Opal | Level 21

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
Opal | Level 21

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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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