<?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: Facing special characters on datasource node rendering in place of &amp;quot;-&amp;quot; in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460264#M132701</link>
    <description>&lt;P&gt;Making sure you are encoding your strings as UTF-8 in Java should solve the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Encoding With Commons-Codec&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;commons-codec&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;commons-codec&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.14&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;

String rawString = "Welcome to Progress - Image Film"; 
byte[] bytes = StringUtils.getBytesUtf8(rawString);
 
String utf8EncodedString = StringUtils.newStringUtf8(bytes);&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;What is UTF-8?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UTF-8 is a variable-width character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from Unicode Transformation Format – 8-bit. UTF-8 is capable of encoding all 1,112,064 valid character code points in Unicode using one to four one-byte code units.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2022 02:27:05 GMT</pubDate>
    <dc:creator>BrianKasingli</dc:creator>
    <dc:date>2022-07-11T02:27:05Z</dc:date>
    <item>
      <title>Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460160#M132658</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="keshava219_0-1657298081575.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/42891iCC2D15E8B4E690CE/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="keshava219_0-1657298081575.png" alt="keshava219_0-1657298081575.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In above image its rending data from thirdparty api calls by name . in place of&amp;nbsp; &amp;nbsp;"-"&amp;nbsp; its coming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but from api i can see value&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Welcome&amp;nbsp;to&amp;nbsp;Progress&amp;nbsp;–&amp;nbsp;Image&amp;nbsp;Film".&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 16:42:18 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460160#M132658</guid>
      <dc:creator>keshava219</dc:creator>
      <dc:date>2022-07-08T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460161#M132659</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17530679"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is character encoding enabled for the third party api response ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Milind&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 16:46:28 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460161#M132659</guid>
      <dc:creator>milind_bachani</dc:creator>
      <dc:date>2022-07-08T16:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460164#M132660</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17530679"&gt;&lt;/LI-USER&gt;&amp;nbsp;, This is because of characters encoding/decoding in a API response( as a matter of. fact, any string-based response).&lt;/P&gt;&lt;P&gt;I saw your response is coming from BufferedReader, so now convert BR to String &amp;amp; then pass into below method to get properly decoded values.&lt;/P&gt;&lt;P&gt;please use following code after you receive response &amp;amp; pass each string here to get proper values.&lt;/P&gt;&lt;P&gt;~Aditya.Ch&lt;/P&gt;&lt;PRE&gt;import java.net.*;
private String allowSplChars(String incomingString) {
        String encodedValue = null;
        try {
        encodedValue= URLEncoder.encode(incomingString.trim(), "UTF-8");
        } catch (UnsupportedEncodingException uee) { 
        	log.error("UnsupportedEncodingException", uee);

        }
         return encodedValue;
	}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 17:06:37 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460164#M132660</guid>
      <dc:creator>Aditya_Chabuku</dc:creator>
      <dc:date>2022-07-08T17:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460165#M132661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17450740"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Im not using response to get api details , Directly from getInputStream&lt;/P&gt;&lt;P&gt;here is the snippet im using :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;conn.setRequestProperty("Content-Type", "application/json");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;conn.setRequestMethod(ABBConstants.GET_REQUEST);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;getting output of json ,&lt;/P&gt;&lt;P&gt;im passing to &lt;STRONG&gt;datasource&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 17:03:12 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460165#M132661</guid>
      <dc:creator>keshava219</dc:creator>
      <dc:date>2022-07-08T17:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460174#M132664</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;LI-USER uid="17527871"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks for the reply,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="keshava219_0-1657300915276.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/42894iA81C2AF1939DEE1D/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="keshava219_0-1657300915276.png" alt="keshava219_0-1657300915276.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after trying that above method&amp;nbsp; spaces and also decoder no change previous still same thing coming .&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 17:23:13 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460174#M132664</guid>
      <dc:creator>keshava219</dc:creator>
      <dc:date>2022-07-08T17:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460180#M132666</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17530679"&gt;&lt;/LI-USER&gt;&amp;nbsp; What is your content type? is it "&lt;SPAN&gt;application/x-www-form-urlencoded"?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 18:26:02 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460180#M132666</guid>
      <dc:creator>ManuMathew1994</dc:creator>
      <dc:date>2022-07-08T18:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460186#M132669</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17530679"&gt;&lt;/LI-USER&gt;&amp;nbsp;Please try out with the below properties in the servlet, while making the request to the api to return the response.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;nbsp;   HttpURLConnection&lt;/SPAN&gt; &lt;SPAN class=""&gt;con&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; (HttpURLConnection) obj.openConnection();
    con.setRequestMethod(&lt;SPAN class=""&gt;"GET"&lt;/SPAN&gt;);
    &lt;STRONG&gt;con.setRequestProperty(&lt;SPAN class=""&gt;"accept-charset"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"UTF-8"&lt;/SPAN&gt;);&lt;/STRONG&gt;
    &lt;STRONG&gt;con.setRequestProperty(&lt;SPAN class=""&gt;"content-type"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"application/x-www-form-urlencoded; charset=utf-8"&lt;/SPAN&gt;);&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hope this helps!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 19:17:38 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460186#M132669</guid>
      <dc:creator>shaileshbassi</dc:creator>
      <dc:date>2022-07-08T19:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Facing special characters on datasource node rendering in place of "-"</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460264#M132701</link>
      <description>&lt;P&gt;Making sure you are encoding your strings as UTF-8 in Java should solve the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Encoding With Commons-Codec&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;commons-codec&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;commons-codec&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.14&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;

String rawString = "Welcome to Progress - Image Film"; 
byte[] bytes = StringUtils.getBytesUtf8(rawString);
 
String utf8EncodedString = StringUtils.newStringUtf8(bytes);&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;What is UTF-8?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UTF-8 is a variable-width character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from Unicode Transformation Format – 8-bit. UTF-8 is capable of encoding all 1,112,064 valid character code points in Unicode using one to four one-byte code units.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 02:27:05 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/facing-special-characters-on-datasource-node-rendering-in-place/m-p/460264#M132701</guid>
      <dc:creator>BrianKasingli</dc:creator>
      <dc:date>2022-07-11T02:27:05Z</dc:date>
    </item>
  </channel>
</rss>

