BookmarkSubscribeRSS Feed
Winkle
Calcite | Level 5

Hi,

I changed one variable label as Simplified Chinese and tried to convert .xpt file. However, this label can show text in Simplified Chinese, but it didn't work in xpt file when I open xpt file in SAS Universal. In xpt file, the label appears garbled. The code was shown below. Wondering if this issue could be fixed? Many thanks.

 

data DM;
 set sdtm.dm;
 label STUDYID ='研究标识符';
run;

libname xptfile xport "\\sass01\tabulations\sdtm\dm.xpt" encoding = "utf-8";
proc copy in=work out=xptfile;
    select dm;
run;

 

 

 

 

 

2 REPLIES 2
Tom
Super User Tom
Super User

I don't think it is Universal Viewer's fault. There is no place to store ENCODING in an XPORT file.

image.png

FreelanceReinh
Jade | Level 19

Hi @Winkle,

 

I was able to replicate the issue. A recent (Oct 2020) external blog post states that SAS Universal Viewer does "not support any other encodings that [sic] ASCII for XPT files[,]" which "was confirmed to [the blogger] by SAS Support" and that "there are currently no viewers at all that support non-ASCII encoding in SAS-XPT files."

 

So, extracting the dataset to a library with UTF-8 encoding seems to be the only workaround (as suggested in a 2013 post by our Chinese super user Ksharp; I've successfully tested it as well).

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 944 views
  • 5 likes
  • 3 in conversation