Convert text in UTF-8

Convert text in UTF-8

When opening data in UTF-8, the transfered text must also be converted to UTF-8.
Check method described :
https://archive.sap.com/discussions/thread/1401493

You can use FM to convert your text to UTF-8 :


    CALL FUNCTION 'TREX_TEXT_TO_UTF8'
      EXPORTING
        text             = text
      IMPORTING
        buffer           = buffer
      EXCEPTIONS
        conversion_error = 1
        OTHERS           = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

Search tag: utf8

About the author

fjourneau administrator

Hi, I'm Florian Journeau, SAP ABAP R3 Freelance, based in Toulouse, France. You want to know more about me, have a look on my CV : cv.fjourneau.net.

Leave a Reply