<?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: XString to String on Unicode-System failed --&amp;gt; cx_sy_conversion_codepage in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340745#M1033893</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;I need to encode the string to BASE64 as I need to add it into a XHTML-File. For example Firefox is able to open embedded images which are Base64-encoded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2008 07:17:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-18T07:17:31Z</dc:date>
    <item>
      <title>XString to String on Unicode-System failed --&gt; cx_sy_conversion_codepage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340743#M1033891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to convert a XString to a String; the content of the string is a png-image. In the past the conversion works, but a few days ago we did an Unicode-Migration of our system and now the conversion fails with the error "CX_SY_CONVERSION_CODEPAGE". I already tried to change the conversion which is used in the create-Method, but everything fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really would appreciate if anybody could help me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lo_conv    TYPE REF TO cl_abap_conv_in_ce,
      lv_decoded TYPE String,
      lv_encoded TYPE String.

lo_conv = cl_abap_conv_in_ce=&amp;gt;create( encoding = 'UTF-8'
                                      input    = iv_png ).

  CALL METHOD lo_conv-&amp;gt;read
    IMPORTING
      data = lv_decoded.

  lv_encoded = cl_http_utility=&amp;gt;if_http_utility~encode_base64( lv_decoded ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first bytes of the PNG-File:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;89504E470D0A1A0A0000000D49484452000002950000019E08020000004A1C6DAE00000001735247
4200AECE1CE90000000467414D410000B18F0BFC6105000000206348524D00007A26000080840000
FA00000080E8000075300000EA6000003A98000017709CBA513C0000000970485973000017110000
171101CA26F33F0000897149444154785EED9D79DC55531BF71F32A4148A2443938A32460351C990
2173320B8584CC32D3602ACA90428368120989CACC6328F39450A2323DAF31C4637ABCDFD7EF7DD6
673FE71E3AF7B9F7D9F7197EEB8FF3D97BEDB5D65EFB77D6BA7EEBBAD6B5D6FAC73F1C8C80113002
46C00818813C4560A38D36AA5FBFFE860E46C00818012360048C40AE220053C3D7FF33D278E69967
BEFCF2CB650E46C00818012360048C40AE22F0AF7FFD6BCE9C39FFC3DF0B172E5CBE7CF9370E46C0
0818012360048C40AE22F0C30F3FCC9F3FFF7FF87BC18205DF7EFBEDFF71300246C0081801236004
721581EFBEFBEEADB7DE327FE7EAFFE37A19012360048C8011280D01F3B7DB8511300246C0081881
FC43C0FC9D7FFF996B6C048C8011300246C0FCED3660048C801130024620FF10307FE7DF7FE61A1B
012360048C8011307FBB0D18012360048C8011C83F04CCDFF9F79FB9C646C0081801236004CCDF6E
0346C0081801236004F20F01F377FEFD67AEB111300246C0081801F3B7DB8011300246C0081881FC
43C0FC9D7FFF996B6C048C8011300246C0FCED3660048C801130024620FF10307FE7DF7FE61A1B01
2360048C8011307FBB0D18012360048C8011C83F04CCDFF9F79FB9C646C0081801236004CCDF6E03
46C0081801236004F20F81ACF0F7BFCA0D198014CAAB505E7245D367564885DEE8C446C008180123
60049241207EFE8626BFF9E69BFFFCE73F7F96167EFBEDB72FBEF8228559CBFFD42FBFFC925C84AF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last bytes of the PNG-File:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;300246C0081881A243C0FC5D747FB93FD80818012360040A0001F37701FC89FE042360048C801128
3A04CCDF45F797FB838D8011300246A00010307F17C09FE84F300246C0081881A243C0FC5D747FB9
3FD80818012360040A0001F37701FC89FE042360048C8011283A04CCDF45F797FB838D8011300246
A00010307F17C09FE84F300246C0081881A243C0FC5D747FB93FD80818012360040A0001F37701FC
89FE042360048C8011283A04CCDF45F797FB838D8011300246A00010307F17C09FE84F300246C008
1881A243A014FEFEE0830FBEFFFEFBAF1D8C8011300246C00818815C4560F9F2E5EFBCF3CE3FA2E1
B5D75E83D58B6E24E30F360246C008180123903F08A069BFF8E28BFFC3DFEDDAB5DB69A79DDA3B18
012360048C80113002B98A004CDDB66DDBFFE16FDF18012360048C801130027984C0FF053CBE0BC5
311913AD0000000049454E44AE426082&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 07:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340743#M1033891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T07:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: XString to String on Unicode-System failed --&gt; cx_sy_conversion_codepage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340744#M1033892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not see any reason to do this. A Xstring holds binary data, and a string holds text data. A PNG bytestreams is not a text and cannot be converted to utf-8. UTF8 is only for text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What exactly do you want to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 07:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340744#M1033892</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-08-18T07:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: XString to String on Unicode-System failed --&gt; cx_sy_conversion_codepage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340745#M1033893</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;I need to encode the string to BASE64 as I need to add it into a XHTML-File. For example Firefox is able to open embedded images which are Base64-encoded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 07:17:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340745#M1033893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T07:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: XString to String on Unicode-System failed --&gt; cx_sy_conversion_codepage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340746#M1033894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to the repository information system (transaction SE80) and search for function modules. You will find a suitable one by searching fpr &lt;STRONG&gt;base64&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 07:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340746#M1033894</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-08-18T07:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: XString to String on Unicode-System failed --&gt; cx_sy_conversion_codepage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340747#M1033895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the FM "SSFC_BASE64_ENCODE" does what I need! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks and best regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 07:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xstring-to-string-on-unicode-system-failed-gt-cx-sy-conversion-codepage/m-p/4340747#M1033895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T07:49:28Z</dc:date>
    </item>
  </channel>
</rss>

