<?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 Removing Special Characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148780#M262297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone, &lt;/P&gt;&lt;P&gt;I'm trying to remove special characters that are found within the data feeds that have been inherited. &lt;/P&gt;&lt;P&gt;I'm looking to use the compress function to remove the special characters but I'm running into issues getting rid of it. &lt;/P&gt;&lt;P&gt;Depending on where I copy the special character it shows as a box or a ? mark shown below in a diamond/square.&lt;/P&gt;&lt;P&gt;In SAS it is showing up as a box. &lt;/P&gt;&lt;P&gt;In the article it is the decimal value of 157 and the hex of 9D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the article that is assisting me. &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf" title="http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf"&gt;http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let testing =testing string�;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; testing = COMPRESS("&amp;amp;testing",,'kw');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am i doing wrong seems so simple but my results are not showing as such? &lt;/P&gt;&lt;P&gt;Any suggestions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Nov 2013 17:44:18 GMT</pubDate>
    <dc:creator>jdmarshg</dc:creator>
    <dc:date>2013-11-19T17:44:18Z</dc:date>
    <item>
      <title>Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148780#M262297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone, &lt;/P&gt;&lt;P&gt;I'm trying to remove special characters that are found within the data feeds that have been inherited. &lt;/P&gt;&lt;P&gt;I'm looking to use the compress function to remove the special characters but I'm running into issues getting rid of it. &lt;/P&gt;&lt;P&gt;Depending on where I copy the special character it shows as a box or a ? mark shown below in a diamond/square.&lt;/P&gt;&lt;P&gt;In SAS it is showing up as a box. &lt;/P&gt;&lt;P&gt;In the article it is the decimal value of 157 and the hex of 9D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the article that is assisting me. &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf" title="http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf"&gt;http://www.lexjansen.com/pharmasug/2010/cc/cc13.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let testing =testing string�;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; testing = COMPRESS("&amp;amp;testing",,'kw');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am i doing wrong seems so simple but my results are not showing as such? &lt;/P&gt;&lt;P&gt;Any suggestions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 17:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148780#M262297</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-19T17:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148781#M262298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the character is getting automatically converted to "?" (actual question mark character), presumably by your session not being a Unicode session.&amp;nbsp; You can either run in Unicode (how to do so depends on your SAS mode, and may not have been installed by default by your SAS administrator) or you can just remove '?'.&amp;nbsp; You also might be able to remove the specific character in the incoming data feed, depending on where the data is brought in from.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 17:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148781#M262298</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-11-19T17:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148782#M262299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try some different options?&lt;/P&gt;&lt;P&gt;eg. keep spaces and alphabetic perhaps?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPRESS("&amp;amp;testing",,'kas');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 17:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148782#M262299</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-11-19T17:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148783#M262300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Snoopy369&lt;/P&gt;&lt;P&gt;Changing of the file is not an option. &lt;/P&gt;&lt;P&gt;I see the character within SAS as the box ascii character I would like to remove. &lt;/P&gt;&lt;P&gt;I'm looking to catch these going forward as well. So placing code and or an expression for the field in question is what I would like to do. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 17:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148783#M262300</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-19T17:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148784#M262301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, &lt;/P&gt;&lt;P&gt;I would have thought so but I'm obviously doing something wrong regarding the code because I'm not getting any of the options to work correctly as far as just manipulating the string. I just tried that and not getting correct results. Its not removing the special character.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 18:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148784#M262301</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-19T18:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148785#M262302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It did for me for the example you provided.&lt;/P&gt;&lt;P&gt;Does it work for that example or not for others? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your full testing code that please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 18:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148785#M262302</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-11-19T18:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148786#M262303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of SAS do you have?&amp;nbsp; Desktop DisplayManager, Enterprise Guide, or Server EG or batch?&amp;nbsp; What default language?&amp;nbsp; If 9.3 or 9.4, did you install as Unicode Server?&amp;nbsp; What does this code show on your SAS session?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;sysencoding;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What shows up when you do;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;x="&amp;amp;testing";&lt;/P&gt;&lt;P&gt;put x= HEX.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 19:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148786#M262303</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-11-19T19:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148787#M262304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not gotten it to work for any of the examples.&lt;/P&gt;&lt;P&gt;I used the code editor in SAS Data Integration Studio 4.6 and also tried it in 5.1.&lt;/P&gt;&lt;P&gt;We are using SAS 9.3 and will shortly be using 9.4 so I believe I should be good as versions go.&lt;/P&gt;&lt;P&gt;The encoding is UTF-8 we changed from Latin(default)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It returns utf-8 and &lt;/P&gt;&lt;P&gt;x=4669726D6120567269656E6420526F6C6CEFBFBD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 19:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148787#M262304</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-19T19:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148788#M262305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is all I have in the code above and it does not remove the special character in Enterprise Guide or Code Editor in SAS DI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 19:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148788#M262305</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-19T19:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148789#M262306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get (in wlatin1,)&lt;/P&gt;&lt;P&gt;x=Firma Vriend Rollï¿½&lt;/P&gt;&lt;P&gt;The last 3 characters are&amp;nbsp; EFBFBD, which is UTF-8 for "FFFD" - the diamond question mark you see (wlatin1 doesn't parse that properly).&amp;nbsp; That means that you already lost the actual character's value that was there before.&amp;nbsp; You can compress that out individually as a character - try "FFFD"x or "EFBFBD"x, one or the other might work (I don't have a UTF8 version available at the moment, sorry).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 19:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148789#M262306</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-11-19T19:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148790#M262307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys what I ended up doing to solve this issue was to add Latin1 to the Infile statement to make SAS read the data correctly. &lt;/P&gt;&lt;P&gt;Data within the SAS DI environment was showing this special characters. &lt;/P&gt;&lt;P&gt;By entering Latin1 in the source file properties (Advanced) it was able to render the data correctly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 18:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/148790#M262307</guid>
      <dc:creator>jdmarshg</dc:creator>
      <dc:date>2013-11-25T18:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Special Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/249334#M262308</link>
      <description>&lt;P&gt;it may be too late but I was working on same issue and found issue.&amp;nbsp;TRANWRD(kpropdata(COLUMNA ,'hex', 'utf-8'),'\xc4',' ') by doing so you can replace with space or whatever you like just put there instead of space.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Special-Characters/m-p/249334#M262308</guid>
      <dc:creator>SukhwinderSingh</dc:creator>
      <dc:date>2016-02-10T22:27:21Z</dc:date>
    </item>
  </channel>
</rss>

