<?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 how do i rename a column name with a unicode character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922528#M363251</link>
    <description>&lt;P&gt;I am trying to add the character mu(µ) on the column name of my sas7bdat file but it gets recognized as "?".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="didexist0001_2-1712042643913.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95077iBCA9898185CCD202/image-size/medium?v=v2&amp;amp;px=400" role="button" title="didexist0001_2-1712042643913.png" alt="didexist0001_2-1712042643913.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="didexist0001_1-1712042597202.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95076i50AD0AE101771487/image-size/medium?v=v2&amp;amp;px=400" role="button" title="didexist0001_1-1712042597202.png" alt="didexist0001_1-1712042597202.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 07:24:33 GMT</pubDate>
    <dc:creator>didexist0001</dc:creator>
    <dc:date>2024-04-02T07:24:33Z</dc:date>
    <item>
      <title>how do i rename a column name with a unicode character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922528#M363251</link>
      <description>&lt;P&gt;I am trying to add the character mu(µ) on the column name of my sas7bdat file but it gets recognized as "?".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="didexist0001_2-1712042643913.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95077iBCA9898185CCD202/image-size/medium?v=v2&amp;amp;px=400" role="button" title="didexist0001_2-1712042643913.png" alt="didexist0001_2-1712042643913.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="didexist0001_1-1712042597202.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95076i50AD0AE101771487/image-size/medium?v=v2&amp;amp;px=400" role="button" title="didexist0001_1-1712042597202.png" alt="didexist0001_1-1712042597202.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 07:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922528#M363251</guid>
      <dc:creator>didexist0001</dc:creator>
      <dc:date>2024-04-02T07:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: how do i rename a column name with a unicode character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922532#M363252</link>
      <description>&lt;P&gt;Better you should put this in a label instead of the variable name. SAS will use the label in the output of almost every PROC.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 10:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922532#M363252</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-02T10:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: how do i rename a column name with a unicode character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922534#M363253</link>
      <description>&lt;P&gt;&lt;STRONG&gt;DO NOT DO THIS.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Funny characters belong in labels, not in variable names. Otherwise you will always be forced to use those silly name literals.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 10:40:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922534#M363253</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-04-02T10:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: how do i rename a column name with a unicode character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922554#M363264</link>
      <description>&lt;P&gt;The question mark indicates that the font used does not recognize how to render the given "text" of the character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will probably not take you very long writing code to get extremely tired of typing all of the quote and n referencing variable names. Using something like '(a)'n adds 7 key strokes, counting the Shift to get the ( and ) to something that can be expressed with just A.&lt;/P&gt;
&lt;P&gt;Define a label one time when creating the variable and you don't have to repeatedly type the '()'n.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plus I know I hate being given code or data that forces me to change my system settings just to run the code or examine the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 13:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922554#M363264</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-04-02T13:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: how do i rename a column name with a unicode character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922565#M363270</link>
      <description>&lt;P&gt;How are you submitting your SAS code?&amp;nbsp; Are you use Display Manager?&amp;nbsp; SAS/Studio? Enterprise Guide?&lt;/P&gt;
&lt;P&gt;What system encoding is set in your SAS session?&amp;nbsp; Check the value of the ENCODING system option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you paste a literal mu character into the code file then the encoding used by that literal string has to match the encoding your SAS session is using.&amp;nbsp; And since mu is not one of the 128 standard ASCII characters it might not even be available in the encoding you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really did need to generate a RENAME statement or a LABEL statement using a character that is not supported by your SAS sessions encoding then you might want to use macro logic to help.&amp;nbsp; So let's assume you need to generate mu in UTF-8 encoding.&amp;nbsp; That would be '&lt;SPAN&gt;CEBC'x.&amp;nbsp; So you might do something like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('mu','CEBC'x);
run;
data have;
   input myvar ;
   label myvar="(/&amp;amp;mu.L)";
cards;
2
2
0
0
;
proc print data=have label;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1712072048596.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95079iEC810701044D5586/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1712072048596.png" alt="Tom_0-1712072048596.png" /&gt;&lt;/span&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 15:34:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-rename-a-column-name-with-a-unicode-character/m-p/922565#M363270</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-02T15:34:16Z</dc:date>
    </item>
  </channel>
</rss>

