Hi All,
I received following error on my SAS program after I executed my program. Does anyone encounter error below and how you solve it.
Error : Failed to transcode data from utf-16le to wlatin1 encoding because it contained characters which are not supported by your sas session encoding. Please review your encoding=and locale=SAS System options to ensure they can accomodate the data that you want to process.
You could either:
1. Use the COMPRESS functions to take out all the abnormalities:
compress(Variable_Name," '0D'x'0A'x",'kw')
2. Try use the data statement encoding option:
data want (encoding = 'utf-8');
set have;
run;
Hi Qoit,
Thanks for your advice
I encountered the error when i run the following coding, which I believe the causes was from the "where" function but there'are too many names and I have no idea what are the abnormalities that causes the error.
I'd like to filter more than 10,000 name from my dataset. below are part of the filter names
data work.table1
set WORK.QUERY_FOR_RESULTS_0000;
WHERE
(UPCASE(Name) LIKE '% HOLDING%' or
UPCASE(Name) LIKE '%ZUTALANT%' or
UPCASE(Name) LIKE '%ZURIAT W É%' or
UPCASE(Name) LIKE '%ZURAH VENTURES%' or
UPCASE(Name) LIKE '%ZURAH PREMIER%' or
UPCASE(Name) LIKE '%ZURAH PERMAI%' or
UPCASE(Name LIKE '%ZURAH IMPIAN%' or
UPCASE(Name) LIKE '%ZURAH ABADI%' );
run;
Imho this is not a data-problem, but caused by chars in your program that are not compatible with the encoding of the sas session.
If possible copy your code to notepad and then copy back to SAS Eg in a new program window and try
@SASnewbie2 wrote:
Hi All,
I received following error on my SAS program after I executed my program. Does anyone encounter error below and how you solve it.
Error : Failed to transcode data from utf-16le to wlatin1 encoding because it contained characters which are not supported by your sas session encoding. Please review your encoding=and locale=SAS System options to ensure they can accomodate the data that you want to process.
If you want to work with that data you need to run SAS in a session that is using a non-single byte encodings. With only a single byte encoding WLATIN1 there are only 256 possible characters that can be represented and the one it is complaining about is not one of them.
How are you running the program now? Are you running from a command line? Clicking on something? Using SAS/Studio or Enterprise Guide or other user interface that allows you to run SAS code. Check with your local SAS support about how to run SAS with unicode support in your environment.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.