UTF8ToCP1253 function
Converts a string from UTF-8 encoding to Code Page 1253.
Declaration
function UTF8ToCP1253(const s: string; SetTargetCodePage: Boolean=False)
: RawByteStringDescription
UTF8ToCP1253 is a
RawByteString function used to
convert a UTF-8-encoded string to the Code Page 1253 (Greek) encoding.
UTF8ToCP1253 calls the UTF8ToSingleByte routine using UnicodeToCP1253 to perform character conversions needed for the target encoding. System code pages are not used (when enabled) because of a failure when translating Unicode code points (#129) to the target code page. The character translation table in UnicodeToCP1253 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1253 in the return value.
UTF8ToCP1253 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
