BookmarkSubscribeRSS Feed
NewmanChow
Fluorite | Level 6

Hello everyone ,

    For some reason I have to use PROC REPORT in u8 session environment . Some Chinese characters can't display properly when I use ODS RTF PRETEXT generated table title.

Example(u8 session environment):

 

data a;
  format Test $10.;
  Test='Test';output;
  Test='测试';output;
run;

title "Test 测试";
ods rtf file="d:\test.rtf" encoding='utf-8';
  proc report data=a style(report)={pretext="test测试" just=left};
  run;
ods rtf close;

output :

 

PRETEXT.png

Chinese characters in the red box are not displayed correctly.

I checked the RTF code and found that ‘测试’ was represented by \'E6\'B5\'8B\'E8\'AF\'95 and \u27979;\u35797; in the PRETEXT and REPORT, respectively.
Replace ODR RTF with ODS TAGSETS.RTF , all characters will be displayed correctly,

but I would like to know if there are any options to ensure that ODS RTF PRETEXT content displayed correctly.

 

thks!

 

 

 

 

 

 

4 REPLIES 4
SASKiwi
PROC Star

This is such a specialist problem that I suspect SAS Tech Support would be your best bet, although they are closed until after New Year.

Vince_SAS
Rhodochrosite | Level 12

Please open a track with our Technical Support Department.

 

https://support.sas.com/ctx/supportform/createForm

 

Vince DelGobbo

SAS R&D

NewmanChow
Fluorite | Level 6

Hi Vince:

    I have submitted a track to SAS Technical Support.
Waiting for their feedback.

thks.

 

NewmanChow
Fluorite | Level 6

Hello Everyone,

     This is the feedback from SAS Technical Support:

 

Dear Customer,

 

This was identified as a defect. the workaround is using ODS TEXT:

 

data a;

  format Test $10.;

  Test='Test';output;

  Test='测试';output;

run;

 

title "Test 测试";

ods rtf file="d:\test.rtf";

ods text="test测试" ;

  proc report data=a

/*style(report)={pretext="test测试" just=left}*/

;

  run;

ods rtf close;

 

 

Regards,

SAS Technical Support

 

sas-innovate-2024.png

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.

 

Register now!

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
  • 4 replies
  • 2084 views
  • 4 likes
  • 3 in conversation