on 2024 Nov 15 4:09 PM
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_data) = cl_bcs_convert=>xstring_to_string(
iv_xstr = lv_xstring
iv_cp = '0120' ).
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 10 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.