<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ascii special characters not resolving in title for png files in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702466#M20774</link>
    <description>&lt;P&gt;Yes. I doubt it is FONT problem for proc sgplot&amp;nbsp; .&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp; might have a good idea.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2020 11:18:23 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-11-30T11:18:23Z</dc:date>
    <item>
      <title>ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702013#M20766</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I am trying to display tilde character in titles for png files. Tilde character is not resolving. I am doing the below.&lt;/P&gt;&lt;P&gt;title "The code has&amp;nbsp; {*ESC*}{unicode '223c'x}34000 characters";&lt;/P&gt;&lt;P&gt;I also tried creating global variable and didn't work like below.&lt;/P&gt;&lt;P&gt;%global x ;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;call symput('x', byte(126));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;title&amp;nbsp;"The code has&amp;nbsp; &amp;amp;til.34000 characters";&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 13:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702013#M20766</guid>
      <dc:creator>SAS_jrnew</dc:creator>
      <dc:date>2020-11-27T13:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702024#M20767</link>
      <description>&lt;P&gt;Read over the documentation carefully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The escape sequence should use parenthesis&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(*ESC*)&lt;/PRE&gt;
&lt;P&gt;The inline formatting unicode function will accept a variety of value specifications, all these work (tested in&amp;nbsp;&lt;EM&gt;SAS 9.4 TS6)&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;ods rtf file='sample.rtf';

proc print data=sashelp.class;
  title1 h=12pt "The code has (*ESC*){unicode '223C'x}34,000 characters";
  title2 h=12pt "The code has (*ESC*){unicode 223Cx}34,000 characters";
  title3 h=12pt "The code has (*ESC*){unicode 223C}34,000 characters";
run;

ods rtf close;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_0-1606484090993.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52043i6DCABA11B0F677D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1606484090993.png" alt="RichardADeVenezia_0-1606484090993.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 13:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702024#M20767</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-11-27T13:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702031#M20768</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;Thanks. Can you please test it in png files ? RTF seems ok ? png is the problem.?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 13:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702031#M20768</guid>
      <dc:creator>SAS_jrnew</dc:creator>
      <dc:date>2020-11-27T13:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702036#M20769</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/358751"&gt;@SAS_jrnew&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;Thanks. Can you please test it in png files ? RTF seems ok ? png is the problem.?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Provide data an code that generates the PNG and you may get a better answer.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 14:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702036#M20769</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-27T14:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702042#M20770</link>
      <description>&lt;P&gt;Unicode by number appears to be broken in titles.&lt;/P&gt;
&lt;P&gt;Unicode by 'name' works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The discrepancy would appear to be a bug in the SG system. (unicode by number &lt;STRONG&gt;might&amp;nbsp;&lt;/STRONG&gt;work for certain&amp;nbsp;fonts, or maybe not.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods escapechar = '^';

ods html file='sample.html';

proc sgplot data=sashelp.class;
  title1 j=l "In SGPLOT";
  title2 j=l h=14pt "Unicode tilde by name (*ESC*){unicode tilde} works";
  title3 j=l h=14pt "Unicode tilde by number (*ESC*){unicode '223C'x} is broken in title footnote";

  footnote1 j=l h=14pt "Unicode tilde by name (*ESC*){unicode tilde} works";
  footnote2 j=l h=14pt "Unicode tilde by number (*ESC*){unicode '223C'x} is broken in title footnote";

  footnote4 j=l h=14pt "Unicode tilde by number ^{unicode '223C'x} is broken in title footnote";

  vbar sex ;
run;

ods html close;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_0-1606489207720.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52045i68B7AE15C5EF12B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1606489207720.png" alt="RichardADeVenezia_0-1606489207720.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 15:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702042#M20770</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-11-27T15:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702172#M20771</link>
      <description>&lt;P&gt;Very interesting.&amp;nbsp;%sysfunc(byte(126)) is working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52061i99355A55D29E3EB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;ods escapechar = '^';
ods text="x (*ESC*){unicode '223C'x} xx  %sysfunc(unicode(\u223C))";
proc sgplot data=sashelp.class;
  title1 j=l "In SGPLOT";
  title2 j=l h=14pt "Unicode tilde by name %sysfunc(byte(126)) wwwworks";
  title3 j=l h=14pt "Unicode tilde by number ∼ is broken in title footnote";

  footnote4 j=l h=14pt "Unicode tilde by number %sysfunc(byte(126)) is broken in title footnote";

  vbar sex ;
run;
&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Nov 2020 12:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702172#M20771</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-11-28T12:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702377#M20772</link>
      <description>&lt;P&gt;The implementation of Unicode in SAS outputs is messy at best.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plus what used to work doesn't work anymore: See the format in&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/Unicode-for-lables-of-panels-in-sgpanel/m-p/332877#M11597" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/Unicode-for-lables-of-panels-in-sgpanel/m-p/332877#M11597&lt;/A&gt;&amp;nbsp;which no longer works .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A major cleanup, simplification and standardisation is long overdue, so one syntax can be used anywhere and for any destination. Unless that's already the case and I missed something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 01:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702377#M20772</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-30T01:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702387#M20773</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34537"&gt;@BeverlyBrown&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33307"&gt;@AnnaBrown&lt;/a&gt;&amp;nbsp;Maybe another idea for a pinned topic?&lt;/P&gt;
&lt;P&gt;How to: Display Unicode values in reports (labels, titles, formats, text, graphs, email, etc), for various destinations and using various procedures. Ideally, a unique syntax would work regardless of the programming context.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 20:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702387#M20773</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-30T20:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702466#M20774</link>
      <description>&lt;P&gt;Yes. I doubt it is FONT problem for proc sgplot&amp;nbsp; .&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp; might have a good idea.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 11:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702466#M20774</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-11-30T11:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702522#M20775</link>
      <description>&lt;P&gt;For those testing this, make sure you add&amp;nbsp;&lt;STRONG&gt;gtitle/gfootnote&lt;/STRONG&gt; to your ODS statement so that the title/footnote appears as part of the graph image, not in the ODS document.&amp;nbsp; Example using SAS Enterprise Guide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar = '^';
ods html5 (id=eghtml) gtitle gfootnote;
proc sgplot data=sashelp.class;
  title1 j=l "In SGPLOT";
  title2 j=l h=14pt "Unicode tilde by name ^{unicode tilde} works";
  title3 j=l h=14pt "Unicode tilde by number ^{unicode '223C'x} is broken in title footnote";

  footnote1 j=l h=14pt "Unicode tilde by name ^{unicode tilde} works";
  footnote2 j=l h=14pt "Unicode tilde by number ^{unicode '223C'x} is broken in title footnote";

  footnote4 j=l h=14pt "Unicode tilde by number ^{unicode '223C'x} is broken in title footnote";

  vbar sex ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;shares info on this topic quite often, and might be able to clarify what you're seeing and best practice.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 15:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702522#M20775</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-11-30T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702523#M20776</link>
      <description>&lt;P&gt;Why are you jumping through hoops to use a character that is part of the 7-bit ASCII codes?&lt;/P&gt;
&lt;P&gt;Are you running on an IBM mainframe that uses EBCDIC characters?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 15:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702523#M20776</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-11-30T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: ascii special characters not resolving in title for png files</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702561#M20777</link>
      <description>&lt;P&gt;The keys here involve the font used in the title and the Unicode value used for tilde. Once you get into the 2000's of the Unicode table, the glyph support in the font can be spotty, depending on the font you use. In Chris' case, he referenced tilde two ways. The first way (^{unicode tilde}) cause us to look up tilde in our table, which uses the Unicode value '0303'. This Unicode value probably exists in all Unicode fonts. However, the second reference (^{unicode '223c'x}) explicitly references a 2000-level code, which the default font in this ODS style does not support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With all of that said, you have three choices:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use the literal '~' in your title&lt;/LI&gt;
&lt;LI&gt;Use ^{unicode tilde} of ^{unicode '0303'x} with no font change&lt;/LI&gt;
&lt;LI&gt;Use ^{unicode '223c'x} while also setting f="Arial Unicode MS" on the TITLE statement&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 18:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ascii-special-characters-not-resolving-in-title-for-png-files/m-p/702561#M20777</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-11-30T18:04:47Z</dc:date>
    </item>
  </channel>
</rss>

