<?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 SAS Remove Special Character in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-Remove-Special-Character/m-p/528732#M5485</link>
    <description>&lt;P&gt;In this topic we will deal with removing special characters&amp;nbsp;&lt;/P&gt;&lt;P&gt;1- Tranwrd&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;tranwrd(column, "?", " ")&lt;BR /&gt;input: "Hello?World" &lt;BR /&gt;output: "Hello World" &lt;BR /&gt;Note: the result is always 200 byte, so keep using length=&amp;lt;length&amp;gt;&lt;BR /&gt;good for: replacing or removing single character &lt;/PRE&gt;&lt;P&gt;document:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2- Translate&lt;/P&gt;&lt;PRE&gt;Translate(column, "&lt;SPAN&gt;`~!@#$%^&amp;amp;*()-_=+\|[]{};:',.&amp;lt;&amp;gt;?/&lt;/SPAN&gt;")&lt;BR /&gt;input: "Hel)lo?Wo.r*ld" &lt;BR /&gt;output: "HelloWorld" &lt;BR /&gt;Note: try to replace ? which used as "space" using tranwrd then use translate &lt;BR /&gt;good for: &lt;BR /&gt;1- removing special characters if spaces are exist &lt;BR /&gt;2- It also have some character option for lower, upper, and letters,...&lt;/PRE&gt;&lt;P&gt;documentation:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215153.htm&amp;nbsp;" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215153.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3- Compress and Kcompress&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;compress(column, "c3b9"x)&lt;BR /&gt;compress(column,"&lt;SPAN&gt;`~!@#$%^&amp;amp;*()-_=+\|[]{};:',.&amp;lt;&amp;gt;?/")&lt;/SPAN&gt;&lt;BR /&gt;c3b9 is the hexadecimal of ù&lt;BR /&gt;x is used for hexadecimal representation &lt;BR /&gt;input: "Hello World�" &lt;BR /&gt;output: "Hello World" &lt;BR /&gt;Note: use x if you need hex repr cause chars like � has different hex representation &lt;BR /&gt;take the string which has this special character to text to hex converted and use it's hex to remove it &lt;BR /&gt;good for: &lt;BR /&gt;1- removing hard special characters &lt;BR /&gt;2- It also have some modifiers in documentation which help a lot&lt;/PRE&gt;&lt;P&gt;Documentation:&amp;nbsp;&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4- kpropdata(COLUMNA ,'hex', 'utf-8') followed by Tranwrd #1&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;kpropdata(COLUMN ,'hex', 'utf-8')&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;if you have this char "�" and followed compress and kcompress hex and normal text and not works &lt;BR /&gt;you should consider kpropdata which &lt;SPAN&gt;Removes or converts unprintable characters&lt;/SPAN&gt; &lt;BR /&gt;also if you find hex "efbfbd" which refers to corrupted string &lt;BR /&gt;the only way which works with me was kpropdata followed by tranwrd &lt;/PRE&gt;&lt;DIV class="clearfix _o46 _3erg _3i_m _nd_  direction_rtl text_align_rtl _4pv0"&gt;&amp;nbsp;documentation:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#a003285543.htm&amp;nbsp;" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#a003285543.htm&amp;nbsp;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jan 2019 12:36:06 GMT</pubDate>
    <dc:creator>abdelrahmanmaha</dc:creator>
    <dc:date>2019-01-21T12:36:06Z</dc:date>
    <item>
      <title>SAS Remove Special Character</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-Remove-Special-Character/m-p/528732#M5485</link>
      <description>&lt;P&gt;In this topic we will deal with removing special characters&amp;nbsp;&lt;/P&gt;&lt;P&gt;1- Tranwrd&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;tranwrd(column, "?", " ")&lt;BR /&gt;input: "Hello?World" &lt;BR /&gt;output: "Hello World" &lt;BR /&gt;Note: the result is always 200 byte, so keep using length=&amp;lt;length&amp;gt;&lt;BR /&gt;good for: replacing or removing single character &lt;/PRE&gt;&lt;P&gt;document:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215027.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2- Translate&lt;/P&gt;&lt;PRE&gt;Translate(column, "&lt;SPAN&gt;`~!@#$%^&amp;amp;*()-_=+\|[]{};:',.&amp;lt;&amp;gt;?/&lt;/SPAN&gt;")&lt;BR /&gt;input: "Hel)lo?Wo.r*ld" &lt;BR /&gt;output: "HelloWorld" &lt;BR /&gt;Note: try to replace ? which used as "space" using tranwrd then use translate &lt;BR /&gt;good for: &lt;BR /&gt;1- removing special characters if spaces are exist &lt;BR /&gt;2- It also have some character option for lower, upper, and letters,...&lt;/PRE&gt;&lt;P&gt;documentation:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215153.htm&amp;nbsp;" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000215153.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3- Compress and Kcompress&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;compress(column, "c3b9"x)&lt;BR /&gt;compress(column,"&lt;SPAN&gt;`~!@#$%^&amp;amp;*()-_=+\|[]{};:',.&amp;lt;&amp;gt;?/")&lt;/SPAN&gt;&lt;BR /&gt;c3b9 is the hexadecimal of ù&lt;BR /&gt;x is used for hexadecimal representation &lt;BR /&gt;input: "Hello World�" &lt;BR /&gt;output: "Hello World" &lt;BR /&gt;Note: use x if you need hex repr cause chars like � has different hex representation &lt;BR /&gt;take the string which has this special character to text to hex converted and use it's hex to remove it &lt;BR /&gt;good for: &lt;BR /&gt;1- removing hard special characters &lt;BR /&gt;2- It also have some modifiers in documentation which help a lot&lt;/PRE&gt;&lt;P&gt;Documentation:&amp;nbsp;&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4- kpropdata(COLUMNA ,'hex', 'utf-8') followed by Tranwrd #1&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;kpropdata(COLUMN ,'hex', 'utf-8')&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;if you have this char "�" and followed compress and kcompress hex and normal text and not works &lt;BR /&gt;you should consider kpropdata which &lt;SPAN&gt;Removes or converts unprintable characters&lt;/SPAN&gt; &lt;BR /&gt;also if you find hex "efbfbd" which refers to corrupted string &lt;BR /&gt;the only way which works with me was kpropdata followed by tranwrd &lt;/PRE&gt;&lt;DIV class="clearfix _o46 _3erg _3i_m _nd_  direction_rtl text_align_rtl _4pv0"&gt;&amp;nbsp;documentation:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#a003285543.htm&amp;nbsp;" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#a003285543.htm&amp;nbsp;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 12:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-Remove-Special-Character/m-p/528732#M5485</guid>
      <dc:creator>abdelrahmanmaha</dc:creator>
      <dc:date>2019-01-21T12:36:06Z</dc:date>
    </item>
  </channel>
</rss>

