The SAS Output Delivery System and reporting techniques

Unicode characters in a TOC?

Reply
Contributor ckx
Contributor
Posts: 59

Unicode characters in a TOC?

I've been using ^{unicode 0394} to include a delta symbol (i.e. a triangle) in my output. This works in the main output but not in the table of contents in RTF or the bookmarks in PDF. There, the ^{unicode 0394} specification appears unaltered. Is there anything I can do about this?

The TOC entries were created using the contents= option in proc report. I'm using proc document to modify my results. I can see the delta symbol is created properly for the level 2 label if I run:

PROC DOCUMENT name=odsdoc.t001_itt;

    list / levels=all details;

    run;

quit;

Everything is as it should be, except for the TOC. Any suggestions? I'm using SAS 9.4.

SAS Super FREQ
Posts: 8,866

Re: Unicode characters in a TOC?

Hi:

  This seems to me to be a fairly specific usage scenario involving ODS RTF and PROC DOCUMENT that needs to have someone look at ALL your code and to also replicate your operating system and version of SAS and possibly, version of Word that you're using for the TOC. I'd recommend opening a track with Tech Support on this question.

cynthia

Contributor ckx
Contributor
Posts: 59

Re: Unicode characters in a TOC?

Posted in reply to Cynthia_sas

Hi Cynthia,

I've reported this problem to SAS Support. I use SAS 9.4 with Enterprise Guide 4.3 and I use Word 2010 but the issue has also occurred with SAS 9.2 and Word 2007. In some cases, you can workaround by using a ascii value, e.g. %sysfunc(byte(181)) for a mu symbol. That's not an option for the delta symbol though.

Here's an example of how you can replicate this problem:

%let currdir=\\nlwagefs00\workgroups\Biometrics\S. SAS\SAS tests\Unicode test;

data class;

    set sashelp.class;

    NoNode3=1;

run;

ods escapechar='^';

ods rtf file="&currdir\unicode test.rtf" style=analysis contents toc_data;

ods pdf file="&currdir\unicode test.pdf" style=analysis  ;

title1 "My level 1 TOC entry with ^{unicode 0394} in it";

ods proclabel "My level 1 TOC entry with ^{unicode 0394} in it";

proc report data=class nowindows contents='Delta symbol (^{unicode 0394}) test';

    define NoNode3 / order order=internal noprint;

    break before NoNode3 / page contents="";

run;

ods _all_ close;

SAS Super FREQ
Posts: 8,866

Re: Unicode characters in a TOC?

Hi:

  I see your issue. The symbol appears in the Title, but not in the TOC in Word, and in my PDF, the symbol does not appear in the TOC or the bookmark area either. I really think this is one of those behaviors where you need the expert help of Tech Support. If they can't figure out what's going on, they can ask the developer (for RTF or PDF). As I see it, the ODS DOCUMENT/replay issue is secondary to the primary issue of why the symbol does not appear in the TOC.  Are you using a Unicode font for all of your document? (This would be controlled by the style template you're using.) But that may be a non-issue, I'd expect the font for the TOC to be the same as the font for the document titles, only smaller. But that's a different, possibly non-fruitful avenue of exploration.

cynthia

Ask a Question
Discussion stats
  • 3 replies
  • 783 views
  • 0 likes
  • 2 in conversation