Sign in Join
FPDoc Onlineexperiment

UTF8ToISO_8859_4 function

In unit LConvEncoding

Converts a string from UTF-8 encoding to ISO 8859-3.

Declaration

pascal
function UTF8ToISO_8859_4(const s: string; 
 SetTargetCodePage: Boolean=False)
: RawByteString

Arguments

s

UTF-8-encoded string value converted in the routine.

SetTargetCodePageTrue if the target code page is set in the return value, False if the default system code page (CP_ACP) is used.

Function result

String value after conversion to ISO 8859-4.

Description

UTF8ToISO_8859_4 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-4 (Latin-4) encoding.

For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-4 code page (28594). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value.

For other platforms, the UTF8ToSingleByte routine is called using UnicodeToISO_8859_4 to perform character conversions needed for the target encoding.

UTF8ToISO_8859_4 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.