The CodeConversion library is a library for converting between UTF-8 encoded strings and OPH-5000i local character code strings.

Note:

With the OPH-5000i English version, you can use one of the following character sets.
CP437_ose
This is default character set of the OPH-5000i English version.
CP1252
You can use the CP1252 library to change the character set to CP1252.

With the OPH-5000i Japanese version, you can use SJIS.

The outline of the CodeConversion library is as follows.


Convert UTF-8 and CP437_ose to each other

Use the following function to convert a UTF-8 string to a CP437_ose string.

Use the following function to convert a CP437_ose string to a UTF-8 string.

Use the following function to convert CP437_ose character code to Unicode.

Use the following function to convert Unicode to CP437_ose character code.


Convert UTF-8 and custom code to each other

By providing your own code conversion function, you can convert UTF-8 and custom code (original code) to each other.

Use the following function to convert a UTF-8 string to a string of custom code (original code).

Use the following function to convert a string of custom code (original code) to a UTF-8 string.


Convert UTF-8 and SJIS to each other

Use the following function to convert a UTF-8 string to an SJIS string.

Use the following function to convert an SJIS string to a UTF-8 string.

Use the following function to convert SJIS character code to Unicode.

Use the following function to convert Unicode to SJIS character code.


Change the output format of the conversion result

By default, the conversion result is output as a character string terminated with NUL. If you set the output format to composite format, you can include both the local character code string and the UTF-8 string in the conversion result.

Use the following function to set the output format of the conversion result.
CONV_OutputMode function


Last updated: 2022/04/08