cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Invalid char # replacement

fgfgfg3r43456534
Explorer
0 Likes
400

I am retrieving some binary data from a table, decompressing and then converting to string with code page 0160, but I have issues with accented characters as it does not get recognized. Have tried multiple codepages (present in TCP00) but without any luck. 


Is there any workaround for this?

 

TRY.
    cl_abap_gzip=>decompress_binary(
      EXPORTING
        gzip_in     lv_xstring
        gzip_in_len -1
      IMPORTING
        raw_out     lv_xstring
    ).

  CATCH cx_parameter_invalid_range.
  CATCH cx_sy_buffer_overflow.
  CATCH cx_sy_compression_error.
ENDTRY.

DATA(rv_datacl_bcs_convert=>xstring_to_string(
  iv_xstr lv_xstring
  iv_cp   '0120' ).

Accepted Solutions (0)

Answers (1)

Answers (1)

HenrikeGrtecke
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello,

Thank you very much for your question and sorry for the late reply.

You may want to try to modify your code and use UTF-8:

DATA(rv_data) = cl_bcs_convert=>xstring_to_string(
  iv_xstr = lv_xstring
  iv_cp   = 'UTF-8' ).

Please also check XString.

Kind regards,

Henrike