<?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: special characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910228#M358988</link>
    <description>&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/nlsref/p078j5y1bbc9xfn1scp11kw3nmnt.htm" target="_self"&gt;BASECHAR function&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 13:07:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-01-03T13:07:15Z</dc:date>
    <item>
      <title>special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910224#M358984</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a situation where in strings can have special characters i.e. names with Umlaut's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example :&lt;/P&gt;
&lt;P&gt;Is there a way for example :CREACIONES PAZ RODRÃ­GUEZ S L replaced with CREACIONES PAZ RODRA­GUEZ S L ?&lt;/P&gt;
&lt;P&gt;But it can any character with umlaut's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data aaa;&lt;BR /&gt;ORGNAME='PAZ RODRÃ­GUEZ S L';&lt;BR /&gt;Run;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 12:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910224#M358984</guid>
      <dc:creator>Anuz</dc:creator>
      <dc:date>2024-01-03T12:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910225#M358985</link>
      <description>&lt;P&gt;It may depend on your character set settings, but I had some problems with your example The obvious solution seems to be the good old TRANSLATE function, but that does not work, as 'Ã' seems to register as more than one character in my current SAS session:&lt;/P&gt;
&lt;PRE&gt; 70         data _null_;
 71           set aaa;
 72           newname=translate(orgname,'A','Ã');
 73           put _all_;
 74         run;
 
 ORGNAME=PAZ RODRÃ­GUEZ S L newname=PAZ RODRA ­GUEZ S L _ERROR_=0 _N_=1&lt;/PRE&gt;
&lt;P&gt;The TRANWRD function works, on the other hand:&lt;/P&gt;
&lt;PRE&gt; 70         data _null_;
 71           set aaa;
 72           newname=tranwrd(orgname,'Ã','A');
 73           put _all_;
 74         run;
 
 ORGNAME=PAZ RODRÃ­GUEZ S L newname=PAZ RODRA­GUEZ S L _ERROR_=0 _N_=1&lt;/PRE&gt;
&lt;P&gt;- only problem with that is that you may have to use several calls to get rid of different "strange" characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;KTRANSLATE works better, as it can translate double-byte to single-byte characters (or the other way round):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 70         data _null_;
 71           ORGNAME='PAZ RODRÃ­GUEZ S Lã';
 72           newname=ktranslate(orgname,'Aa','Ãã');
 73           put _all_;
 74         run;
 
 ORGNAME=PAZ RODRÃ­GUEZ S Lã newname=PAZ RODRA­GUEZ S La _ERROR_=0 _N_=1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 13:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910225#M358985</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2024-01-03T13:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910226#M358986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/382230"&gt;@Anuz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, I don't think SAS is able to recognise the "basic" character, but you can build your own translation table, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;108
109  data aaa;
110    ORGNAME='PAZ RODRÃ­GUEZ S L';
111    NEWNAME = translate(ORGNAME,'A','Ã');
112    put ORGNAME=;
113    put NEWNAME=;
114  Run;

ORGNAME=PAZ RODRÃ­GUEZ S L
NEWNAME=PAZ RODRA­GUEZ S L
&lt;/PRE&gt;
&lt;P&gt;You can supply a whole list of to-characters and from-characters in the same translate, see the. manual.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 13:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910226#M358986</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2024-01-03T13:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910228#M358988</link>
      <description>&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/nlsref/p078j5y1bbc9xfn1scp11kw3nmnt.htm" target="_self"&gt;BASECHAR function&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 13:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910228#M358988</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-01-03T13:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910462#M359050</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; That resolved the issue. that is exactly what i was after. Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 15:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/special-characters/m-p/910462#M359050</guid>
      <dc:creator>Anuz</dc:creator>
      <dc:date>2024-01-04T15:07:29Z</dc:date>
    </item>
  </channel>
</rss>

