Hello SAS Colleagues,
I am encountering this error while working on a dataset that earlier imported from a websource:
"Failed to transcode data from utf-8 to utf-16le encoding because it contained characters which are not supported by your SAS session encoding..." (screen-shot attached).
I have already configured my SAS to "u8" version long before importing this data; and it is still the same. Also, I find this message is strange as usually it is reverse (as per my websearch).
Moreover, also noticed: SAS 9.4 is 64-bit while Enterprise Guide is 32-bit. Not sure if this is causing the problem.
It will be great if someone can help me 🙂
Thanks,
So, my solution for this error (credit goes to my project leader):
first, to change back my sas configuration to "en" from "u8" that I was using for certain files.
second, assign libname for folders of all "u8" sas files with the option "inencoding=wlatin2".
Hope this will be helpful for someone else like me encountering problems with characters.
Thanks,
May be it has been discussed here (https://communities.sas.com/t5/SAS-Enterprise-Guide/Encoding-Issue-UTF8-to-UTF-16-le/td-p/380048)
Sure @Vassilis .
1) You can change the configuration in the config. file that you should see in your C:. A path will be something similar to :
C:/program files/SAS Home/SAS Foundation/9.4/sasv9.cfg
This should open a text file where you can see nls\en\sasv9: change "en" to "u8".
(See for more details: https://documentation.sas.com/?docsetId=dplyml0phy0win&docsetTarget=p61010as31914aa4aa1477100150.htm...)
If you have special characters in excel file; this step should be enough.
2) But if in future you would need to convert this sas dataset again to english version (bz sometimes merging datasets require the same config in all datasets):
Then import with libname where you need to specify inencoding=wlatin1 or wlatin2.
(See for more details: https://documentation.sas.com/?docsetId=nlsref&docsetTarget=n02q3gv9mfdwnmn1ca9kqa3gbayl.htm&docsetV...
So, my solution for this error (credit goes to my project leader):
first, to change back my sas configuration to "en" from "u8" that I was using for certain files.
second, assign libname for folders of all "u8" sas files with the option "inencoding=wlatin2".
Hope this will be helpful for someone else like me encountering problems with characters.
Thanks,
Hello,
I am facing the same problem while trying to import an excel file to Enterprise Guide. Can you please provide details about the changes you made? I cannot find the way to change SAS configuration or where to insert the "inencoding=wlatin2" option. Thank you in advance.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.