<?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: Bug First Char in my XML String (if_ixml_document) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214919#M1716675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Youri, your code doesn't show the source where the string (or xstring?) "response" was created. The point is that "response" contains at the beginning the byte order mark EFBBBF for UTF-8 ( &lt;A href="http://en.wikipedia.org/wiki/Byte_Order_Mark" title="http://en.wikipedia.org/wiki/Byte_Order_Mark"&gt;http://en.wikipedia.org/wiki/Byte_Order_Mark&lt;/A&gt; ), a kind of magical number used by some software to indicate the encoding. &lt;/P&gt;&lt;P&gt;Regards, Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2013 20:31:55 GMT</pubDate>
    <dc:creator>Ruediger_Plantiko</dc:creator>
    <dc:date>2013-01-30T20:31:55Z</dc:date>
    <item>
      <title>Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214918#M1716674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use "if_ixml" object to build an XML String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code :&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_ixml &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_document &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_document&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_mt_response &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_element&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_streamfactory &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_stream_factory&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_ostream &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_ostream&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_renderer &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_renderer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lo_encoding &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_ixml_encoding&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONSTANTS&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;c_encoding &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'UTF-8'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_ixml &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;cl_ixml&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;create&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_document &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_ixml&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_document&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_encoding &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_ixml&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_encoding&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;character_set &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c_encoding&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte_order &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_document&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_encoding&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;encoding &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_encoding &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_mt_response &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_document&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_simple_element&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'MT_Agreement_Response'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_document &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_streamfactory &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_ixml&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_stream_factory&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_ostream &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_streamfactory&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_ostream_cstring&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;string &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;response &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_renderer &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_ixml&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_renderer&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;ostream&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_ostream&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lo_document &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_ostream&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_pretty_print&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'X' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp; lo_renderer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;render&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i read my XML String (response) i have a bug with first char.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ï»¿&lt;/STRONG&gt;&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;MT_Agreement_Response/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the encoding is not "UTF-8"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have an idea ... ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the XML Response in .Net (Web Service)&lt;/P&gt;&lt;P&gt;But in my Abap Debugger this problem is already present, not a .Net problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Youri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 14:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214918#M1716674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-30T14:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214919#M1716675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Youri, your code doesn't show the source where the string (or xstring?) "response" was created. The point is that "response" contains at the beginning the byte order mark EFBBBF for UTF-8 ( &lt;A href="http://en.wikipedia.org/wiki/Byte_Order_Mark" title="http://en.wikipedia.org/wiki/Byte_Order_Mark"&gt;http://en.wikipedia.org/wiki/Byte_Order_Mark&lt;/A&gt; ), a kind of magical number used by some software to indicate the encoding. &lt;/P&gt;&lt;P&gt;Regards, Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 20:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214919#M1716675</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T20:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214920#M1716676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use FM SCP_REPLACE_STRANGE_CHARS and remove the strange characters from the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Sreekanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 21:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214920#M1716676</guid>
      <dc:creator>SreekanthKrishn</dc:creator>
      <dc:date>2013-01-30T21:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214921#M1716677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I checked it on my system. "response" has to be of type string, and the content is generated by your code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the &lt;STRONG&gt;string&lt;/STRONG&gt; does not contain the strange chars. When I run your code on my system and inspect the string in the debugger, there is no UTF-8 BOM in it (and this would be really mysterious for a STRING anyway). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the BOM must be added later on in your processing. Maybe, somewhere the string will be converted into an XSTRING? What happens later to "response"? How will it be placed into the HTTP response&amp;nbsp; body? With if_http_response-&amp;gt;SET_CDATA()? Or do you convert it into some encoding and call if_http_response-&amp;gt;SET_DATA( )?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 21:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214921#M1716677</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T21:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214922#M1716678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The var response is a String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you try to edit the response in debugger ?&lt;/P&gt;&lt;P&gt;Try to delete first Char "&amp;lt;"&lt;/P&gt;&lt;P&gt;The first Char is invisible in my debugger.&lt;/P&gt;&lt;P&gt;But when i try to delete "&amp;lt;", i delete this first char invisible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After i send the response (string) to a web service.&lt;/P&gt;&lt;P&gt;Nothing special.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you an idea for UTF-8 encoding ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 21:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214922#M1716678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-30T21:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214923#M1716679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just saw : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;This table illustrates how BOMs are represented as byte sequences and how they might appear in a text editor that is interpreting each byte as a legacy encoding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UTF-8 = &lt;CODE&gt;ï»¿&lt;/CODE&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;This&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is what&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I have in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;my variable response when i display it in an editor.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Will i have to delete ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214923#M1716679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-30T22:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214924#M1716680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Youri, there is nothing special with the string that I get from your test code. Here is how it looks in the debugger on my system, see the picture below. When I delete the '&amp;lt;' ? Well, then the '?' will be the first character. Nothing special. Nothing strange. A sequence of characters, that's it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;"After I send the response to a web service".&lt;/P&gt;&lt;P&gt;This seems to be the critical point. At this point, probably the BOM will be plugged in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/180325" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214924#M1716680</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T22:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214925#M1716681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Youri, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK, you got it. These are the three bytes that &lt;EM&gt;some programs&lt;/EM&gt; use to mark a text as UTF-8 encoded. AFAIK, in ABAP conversions you can control whether you want to generate an XSTRING with BOM or without it. (Chosing "Without it" would be better in my eyes: These BOM's are not really a good idea.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&amp;gt; Will i have to delete ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It's always better to find out at which place the BOM is inserted, instead of first producing unwanted things, and later deleting them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somewhere on the further way, your string will be converted into an xstring, and it is at this place where the UTF-8 BOM gets mixed in. Find this place and surpress the BOM generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214925#M1716681</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T22:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214926#M1716682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok this is strange.&lt;/P&gt;&lt;P&gt;In my debugger i have an invisible char ... just after : lo_renderer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;render&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You think i can delete it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And how to have encoding="utf-8" in the first xml tag ?&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;Anyway thank you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for your help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:17:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214926#M1716682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-30T22:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214927#M1716683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Youri, I find this not so strange as you. My SAP system is an old non-unicode system, using iso-8859-1 as encoding, which is a one-character-one-byte encoding. Your system is a unicode system: This always uses internally UTF-16 (LE) as encoding (which has 1 char = 2 bytes). Probably the first byte that you see is the '00', the MSB from the '&amp;lt;' character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You better not change manually UTF-16 to UTF-8 in the string - you seem to be tended to! This would be a lie. You would claim a string to be UTF-8 which actually is not UTF-8 but UTF-16. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to convert an XML document into an UTF-8 xstring is the identity transformation: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;data&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lv_response &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_xresponse &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;xstring&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;perform &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;do &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;changing &lt;/SPAN&gt;lv_response&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;call &lt;/SPAN&gt;transformation &lt;SPAN class="L0S52"&gt;id &lt;/SPAN&gt;source xml lv_response&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result xml lv_xresponse&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;break-point&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(Here, the subroutine do contains the code that you posted). If you inspect lv_xresponse in the debugger, it will be UTF-8 encoded. Including the correct encoding attribute in the &amp;lt;?xml?&amp;gt; preamble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:30:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214927#M1716683</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T22:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bug First Char in my XML String (if_ixml_document)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214928#M1716684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; But even more elegant would be to create an XSTRING ostream instead of a CSTRING ostream as you do. Then, the XML will be created from the beginning as an XSTRING in the UTF-8 format, and there is no need to post-process it at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bug-first-char-in-my-xml-string-if-ixml-document/m-p/9214928#M1716684</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-01-30T22:32:33Z</dc:date>
    </item>
  </channel>
</rss>

