[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Converts a value from UTF-8 encoding to the Macintosh Code Page.
Source position: lconvencoding.pas line 200
function UTF8ToMacintosh( |
const s: string; |
SetTargetCodePage: Boolean = False |
s |
|
UTF-8-encoded string value converted in the routine. |
SetTargetCodePage |
|
True if the target code page is set in the return value, False if a code page is not used. |
String value after conversion to Macintosh encoding.
UTF8ToMacintosh is a RawByteString function used to convert a UTF-8-encoded string to the Apple Macintosh Roman code page.
For platforms where system code pages are enabled, SetCodePage is called to convert the value to the Macintosh Roman code page (10000). 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 UnicodeToMacintosh to perform character conversions needed for the target encoding.
UTF8ToMacintosh is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine.
Version 3.2 | Generated 2024-02-25 | Home |