I have a SQL Server table with chinese characters in it. I am able to view it properly through Base SAS (Unicode Suppport), but when I try to open it in Enterprise Guide, I hit the error "Unable to transcode data to/from UCS-2 encoding" upon clicking the dataset.
libname mydb odbc noprompt="driver=sql server;server=mysrv/db;uid=sa;pwd=pwd;database=mydb;" schema=dbo;
Greatly appreciate any inputs on this.
Thanks!
Change your SAS encoding into UTF-8 .
The default is already in UTF-8.
I managed to resolve it by adding read permissions to the library and table itself in SMC and pre-assigning the library with metadata engine.
I find it strange though that sometimes the error appears when you first open the table but once it's in the process flow it can actually be viewed properly.
Is it the collation in SQL Server? The database is Latin1_General_CI_AI and I can view chinese characters when I query in SQL Management Studio.
I'm actually able to view them now in SAS EG also, but when I filter by dates I get thrown again to a similar error.
It is most likely unprinted character problem. E.X. you have half of a chinese word or a illegal character for EG.
If that was it, you need clean your data before using EG.
Also see if you could print it in HTML destination.
ods html;
proc print data=have(obs=100);run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.