<?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 Remove or Replace Non-Printable characters from a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313030#M1918526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better try to determine what you would consider as "printable". Once you have that list, you may replace any other character with space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2015 18:13:52 GMT</pubDate>
    <dc:creator>Juwin</dc:creator>
    <dc:date>2015-10-13T18:13:52Z</dc:date>
    <item>
      <title>How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313027#M1918523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a string contains special characters (e.g. HexCode: 0xb). I'd like to remove that non printable characters from the string.Can anyone please let me know how to replace Special Characters from a string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Priyanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 12:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313027#M1918523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-10-12T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313028#M1918524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use REPLACE with regular expression. Search for this. There are a lot of good examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this link will be helpful &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/902ce392-dfce-2d10-4ba9-b4f777843182?QuickLink=index&amp;amp;overridelayout=true&amp;amp;49533857875589"&gt;http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/902ce392-dfce-2d10-4ba9-b4f777843182?QuickLink=index&amp;amp;overridelayout=true&amp;amp;49533857875589&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 13:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313028#M1918524</guid>
      <dc:creator>michael_kozlowski</dc:creator>
      <dc:date>2015-10-12T13:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313029#M1918525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do see the "0xb" in the hexadecimal viewer of the debugger or is it part of the string? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If latter, then how do you think the ABAP runtime can identify "0xb" as a hex-code? Is there a special character (e.g., , #, ~) which marks the beginning of the hex-values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 13:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313029#M1918525</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2015-10-12T13:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313030#M1918526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better try to determine what you would consider as "printable". Once you have that list, you may replace any other character with space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 18:13:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313030#M1918526</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2015-10-13T18:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313031#M1918527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Priya,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Sadly, The SAP implementation of REGEX does not yet allow you to define an arbitrary Unicode character (aka code point) for use with the REPLACE command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;So, you will have to cheat. Try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;DATA: x_b TYPE c LENGTH 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;DATA: str TYPE string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;str = 'Hello#There'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;PERFORM c2h USING '2300' CHANGING x_b.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;REPLACE x_b IN str WITH ''.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;The result is string "HelloThere" after replacing the pound (hex 23) character with nothing. This will work with any UTF-16 code point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I think your "0xB" hex value is the vertical tab codepoint "0B00".&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Use this utility subroutine to make this happen:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;FORM c2h USING char TYPE c CHANGING hex TYPE c.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_hex&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;c&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x_buffer &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;xstring&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;FIELD-SYMBOLS&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&amp;lt;dest&amp;gt; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;x&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31" style="font-family: 'courier new', courier; font-size: 8pt;"&gt;*&amp;nbsp;&amp;nbsp; Move character field to a byte string&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MOVE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;char &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;x_buffer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31" style="font-family: 'courier new', courier; font-size: 8pt;"&gt;*&amp;nbsp;&amp;nbsp; Convert bytes to characters (not confined to ascii)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ASSIGN&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;p_hex &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dest&amp;gt; CASTING&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MOVE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;x_buffer &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dest&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNASSIGN&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&amp;lt;dest&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hex &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;p_hex&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;ENDFORM.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 23:06:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313031#M1918527</guid>
      <dc:creator>juan_suros</dc:creator>
      <dc:date>2015-10-13T23:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove or Replace Non-Printable characters from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313032#M1918528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try it like this with replace and regular expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: str TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'Hello World'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_abap_char_utilities=&amp;gt;VERTICAL_TAB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_abap_char_utilities=&amp;gt;CR_LF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_abap_char_utilities=&amp;gt;FORM_FEED&lt;/P&gt;&lt;P&gt;INTO str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;replace all occurrences of regex '[^[:print:]]' in str with ` `.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 09:42:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-or-replace-non-printable-characters-from-a-string/m-p/11313032#M1918528</guid>
      <dc:creator>michael_kozlowski</dc:creator>
      <dc:date>2015-10-14T09:42:00Z</dc:date>
    </item>
  </channel>
</rss>

