<?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: How to delete a string of special character in character variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458804#M116456</link>
    <description>&lt;P&gt;Thank you Cynthia_sas. How can I convert the excel file to a unicode font? The format cells option in excel do not provide unicode choice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Apr 2018 19:15:34 GMT</pubDate>
    <dc:creator>daisy6</dc:creator>
    <dc:date>2018-04-30T19:15:34Z</dc:date>
    <item>
      <title>How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458776#M116449</link>
      <description>&lt;P&gt;Hello SAS guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I import the excel file into SAS, the SAS dataset has some special charater string beginning with &amp;amp;#, which the excel file don't have, such as "&amp;amp;#160;" ,"&amp;amp;# 8875;", "&amp;amp;#8217;".&amp;nbsp; How can I delete those unwanted strings. It seems there is nothing strange with excel file, however these special string shows up between the space of two words instead of blank space. Any idea is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my SAS data is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var1&lt;/P&gt;&lt;P&gt;Newton&amp;amp;#8217;s seconde law for particles&lt;/P&gt;&lt;P&gt;Newtow&amp;amp;#8217;s first law for particales&lt;/P&gt;&lt;P&gt;Region&amp;amp;#160;1&lt;/P&gt;&lt;P&gt;13.&amp;amp;#160;Basic Math&lt;/P&gt;&lt;P&gt;4.Instruction and#&amp;amp;8875; Concepts&lt;/P&gt;&lt;P&gt;7.Vibratons#&amp;amp;8875;knowledge&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 Apr 2018 18:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458776#M116449</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-04-30T18:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458791#M116453</link>
      <description>&lt;P&gt;What method did you use to import the data?&amp;nbsp; What version of SAS are you using.&lt;/P&gt;
&lt;P&gt;I think this issue of some unicode characters being stored this way was fixed in a recent update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can just use TRANWRD() function to convert them.&lt;/P&gt;
&lt;P&gt;160 (or 'A0'x) is a "non-breaking" space.&amp;nbsp; So just replace it with a space.&lt;/P&gt;
&lt;P&gt;8217 is a curly single quote. I would just replace it with a normal single quote.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458791#M116453</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-30T18:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458792#M116454</link>
      <description>Hi:&lt;BR /&gt;  You have to be careful how you translate them. For example, on this site:&lt;BR /&gt;&lt;A href="https://www.w3schools.com/charsets/ref_utf_punctuation.asp" target="_blank"&gt;https://www.w3schools.com/charsets/ref_utf_punctuation.asp&lt;/A&gt;&lt;BR /&gt;you can see that &amp;amp;#8217 is the single apostrophe or RIGHT SINGLE QUOTATION MARK you need for Newton's. &lt;BR /&gt;&lt;BR /&gt;And the &amp;amp;#160, shown here: &lt;A href="https://www.w3schools.com/charsets/ref_html_8859.asp" target="_blank"&gt;https://www.w3schools.com/charsets/ref_html_8859.asp&lt;/A&gt; seems to be the non-breaking space. &lt;BR /&gt;&lt;BR /&gt;And the #8875 seems to be some kind of math symbol, as shown here: &lt;A href="https://www.w3schools.com/charsets/ref_utf_math.asp" target="_blank"&gt;https://www.w3schools.com/charsets/ref_utf_math.asp&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;That form &amp;amp;#xxxx; is an HTML entity and you can look them up on the W3C site.&lt;BR /&gt;&lt;BR /&gt;  You might be able to have Excel use the correct entity when it displays the value if you change the font for the sheet to a Unicode font.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 30 Apr 2018 18:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458792#M116454</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-30T18:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458794#M116455</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;I use SAS 9.4(TS1M3). The import code is proc import datafile="datadir\excelfilename.xlse" out=have dbms=xlsx replace;&lt;/P&gt;&lt;P&gt;getnames=no;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for answering the question&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458794#M116455</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-04-30T19:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458804#M116456</link>
      <description>&lt;P&gt;Thank you Cynthia_sas. How can I convert the excel file to a unicode font? The format cells option in excel do not provide unicode choice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458804#M116456</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-04-30T19:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458807#M116457</link>
      <description>&lt;P&gt;Thank you very much. It works.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458807#M116457</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-04-30T19:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a string of special character in character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458944#M116504</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x='Newton&amp;amp;#8217;s seconde law for particles';
x=htmldecode(x);
put x=;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 May 2018 10:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-a-string-of-special-character-in-character/m-p/458944#M116504</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-05-01T10:34:41Z</dc:date>
    </item>
  </channel>
</rss>

