<?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>Question Re: Issue with special characters while using Base64 encoding in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaa-p/552072#M118026</link>
    <description>&lt;P&gt;Try with mentioning the encoding in the getBytes method:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Ex: encoder.encode(payload.getBytes("UTF-8"));&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And also instead if using SUN's Base64 class use the default SAP provide a class to encode.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Dec 2017 12:27:37 GMT</pubDate>
    <dc:creator>manoj_khavatkopp</dc:creator>
    <dc:date>2017-12-23T12:27:37Z</dc:date>
    <item>
      <title>Issue with special characters while using Base64 encoding</title>
      <link>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaq-p/552071</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;I am using Base64 encoding to encode the xml message and send it to a single field. The encoding is unable to handle the special characters(ex. characters of Spanish language). The message gets encoded but the special character is converted to some junk value.&lt;/P&gt;
  &lt;P&gt;Is there any way to handle this? Below is the UDF code being used:&lt;/P&gt;
  &lt;P&gt;BASE64Encoder encoder = new BASE64Encoder();&lt;/P&gt;
  &lt;P&gt;String encoded = encoder.encode(payload.getBytes());&lt;/P&gt;
  &lt;P&gt;encoded = encoded.replace("\n","").replace("\r", "");&lt;/P&gt;
  &lt;P&gt;return encoded;&lt;/P&gt;
  &lt;P&gt;Kindly advice changes in code if required.&lt;/P&gt;
  &lt;P&gt;Thanks in advance!&lt;/P&gt;
  &lt;P&gt;Pankaj&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaq-p/552071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-12-22T17:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with special characters while using Base64 encoding</title>
      <link>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaa-p/552072#M118026</link>
      <description>&lt;P&gt;Try with mentioning the encoding in the getBytes method:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Ex: encoder.encode(payload.getBytes("UTF-8"));&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And also instead if using SUN's Base64 class use the default SAP provide a class to encode.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2017 12:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaa-p/552072#M118026</guid>
      <dc:creator>manoj_khavatkopp</dc:creator>
      <dc:date>2017-12-23T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with special characters while using Base64 encoding</title>
      <link>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaa-p/552073#M118027</link>
      <description>&lt;P&gt;Hi Manoj,&lt;/P&gt;
  &lt;P&gt;Received below error when above code used:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;error: unreported exception UnsupportedEncodingException; must be caught or declared to be thrown&lt;BR /&gt; String encoded = encoder.encode(payload.getBytes("UTF-8"));&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Pankaj&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 09:08:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/issue-with-special-characters-while-using-base64-encoding/qaa-p/552073#M118027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-01-03T09:08:16Z</dc:date>
    </item>
  </channel>
</rss>

