2007 Jul 15 12:38 PM
Hello to all,
I am looking for a way to check whether a given character in a unicode system can be converted into a certain codepage or not. Maybe there is even a function module, that marks all the non-printable characters in a string with the '#'-sign...
thangs for researching
Jörg
2007 Jul 15 4:54 PM
Hi Jörg.
TRANSLATE c TO CODE PAGE g2.
should raise a sy-subrc <> 0 if not convertible.
Regards,
Clemens
2007 Jul 15 2:43 PM
Hi,
4-digit number of the SAP codepage. The function module SCP_CODEPAGE_BY_EXTERNAL_NAME provides the SAP codepage number for an external character set name, for example, "iso-8859-1". The function module NLS_GET_FRONTEND_CP provides the respective non-Unicode frontend codepage for a language.
The desired codepage can be determined interactively, if the parameter with_encoding of method file_open_dialog is set by cl_gui_frontend_services.
If the specified codepage is not suited for the Byte Order Mark of the file, an exception is triggered.
SPACE: Codepage of the frontend operating system
<b>Reward points</b>
Regards
2007 Jul 15 4:54 PM
Hi Jörg.
TRANSLATE c TO CODE PAGE g2.
should raise a sy-subrc <> 0 if not convertible.
Regards,
Clemens