I tried to import Simplified Chinese rtf files with following code, but the all simplified Chinese word will become like below.
Is there any method that I could get the simplified Chinese word?
filename rtf "xxxxxxxxxxxxxxxxxx\&output..rtf";
data rtf_input;
infile rtf
delimiter='00'x MISSOVER DSD lrecl=32767
firstobs=1;
format f1 $500.;
input
f1 $ ;
run;
Since RTF is not intended for data interchange I wish you lots of luck with this project.
I would recommend to try saving the file to plain text format so most of the RTF code tags go away. That might make reading the file a lot simplier.
What do you mean by "simplified Chinese word"?
I am totally unfamiliar with these issues, so this question might be wholly naïve: have you set session encoding, and filename encoding?
See 16355 - Does SAS support UTF-16 encoding?.
I looked at the third character 分 (the easiest to identify to my western eyes).
According to https://www.yellowbridge.com/chinese/charsearch.php?zi=%E5%88%86
The document seems to use gb2312 encoding.
I am unsure that SAS supports it. If not, you'll have to transcode to UTF (and use a UTF SAS session).
So you'll have to read the value B7D6 and transform it to U+5206.
you'll have to read the value B7D6 and transform it to U+5206. As you mention,how could I transform B7D6 to U+5206?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.