diff --git a/docs/xml/lazutils/codepagescommon.xml b/docs/xml/lazutils/codepagescommon.xml index 7ff17b4086..1a4d58fdad 100644 --- a/docs/xml/lazutils/codepagescommon.xml +++ b/docs/xml/lazutils/codepagescommon.xml @@ -11,7 +11,9 @@ - + + Array type which provides indexed access to UTF-8 codepoint pointers. + @@ -38,6 +40,18 @@ + + Provides a mapping for ISO-8859-14 characters to UTF-8 codepoints. + +

+ ISO/IEC 8859-14 +

+
+ + ISO_8859_14ToUTF8 + +
+ diff --git a/docs/xml/lazutils/lconvencoding.xml b/docs/xml/lazutils/lconvencoding.xml index 7b7dd87296..80fb51c1bb 100644 --- a/docs/xml/lazutils/lconvencoding.xml +++ b/docs/xml/lazutils/lconvencoding.xml @@ -174,6 +174,9 @@ Encoding name for ISO 8859-9 Code Page. + + Encoding name for ISO 8859-14 Code Page. + Encoding name for ISO 8859-15 Code Page. @@ -249,6 +252,14 @@
UTF8ToUTF8BOM
EncodingCPIso1 ('iso88591')
UTF8ToISO_8859_1
+
EncodingCPIso2 ('iso88592')
+
UTF8ToISO_8859_2
+
EncodingCPIso9 ('iso88599')
+
UTF8ToISO_8859_9
+
EncodingCPIso14 ('iso885914')
+
UTF8ToISO_8859_14
+
EncodingCPIso15 ('iso885915')
+
UTF8ToISO_8859_15
EncodingCP1250 ('cp1250')
UTF8ToCP1250
EncodingCP1252 ('cp1252')
@@ -261,10 +272,10 @@
ConvertUTF8ToAnsi

- Encoded is a Boolean output parameter which indicates if a routine was found to perform the requested conversion. Its value is False when a conversion routine was not found for the target encoding in ToEncoding. + Encoded is a Boolean output parameter which indicates if a routine was found to perform the requested conversion. Its value is False when a conversion routine was not found for the target encoding in ToEncoding.

- SetTargetCodePage is a Boolean argument which indicates if SetCodePage is called to apply a translated code page for the converted value. The default value for the argument is False, and omits the code page for the return value. + SetTargetCodePage is a Boolean argument which indicates if SetCodePage is called to apply a translated code page for the converted value. The default value for the argument is False, and omits the code page for the return value.

ConvertEncodingFromUTF8 is used in the implementation of the ConvertEncoding function. @@ -287,12 +298,12 @@ - True if the return value contains multi-byte encoded values, False if it contains a single-byte ANSI string. + True if the return value contains multi-byte encoded values, False if it contains a single-byte ANSI string. - True if the code page should be set for the return value, False if a code page is not used. + True if the code page should be set for the return value, False if a code page is not used. @@ -313,6 +324,14 @@

UTF8BOMToUTF8
EncodingCPIso1 ('iso88591')
ISO_8859_1ToUTF8
+
EncodingCPIso2 ('iso88592')
+
ISO_8859_2ToUTF8
+
EncodingCPIso9 ('iso88599')
+
ISO_8859_9ToUTF8
+
EncodingCPIso14 ('iso885914')
+
ISO_8859_14ToUTF8
+
EncodingCPIso15 ('iso885915')
+
ISO_8859_15ToUTF8
EncodingCP1250 ('cp1250')
CP1250ToUTF8
EncodingCP1252 ('cp1252')
@@ -325,7 +344,7 @@
ConvertAnsiToUTF8

- Encoded is a Boolean output parameter which indicates if a routine was found to perform the requested conversion. Its value is False when a conversion routine was not found for the source encoding in FromEncoding. + Encoded is a Boolean output parameter which indicates if a routine was found to perform the requested conversion. Its value is False when a conversion routine was not found for the source encoding in FromEncoding.

ConvertEncodingToUTF8 is used in the implementation of the ConvertEncoding function. @@ -353,7 +372,7 @@ - True if the result contains a multi-byte encoded value. Always True for conversions to UTF-8. + True if the result contains a multi-byte encoded value. Always True for conversions to UTF-8. @@ -378,7 +397,7 @@ ConvertEncoding calls ConvertEncodingFromUTF8 to convert the string value when the FromEncoding is UTF-8. ConvertEncodingToUTF8 is called when ToEncoding is UTF-8. For other encoding conversions, ConvertEncodingToUTF8 is called to both get a UTF-8 value which is then converted using ConvertEncodingFromUTF8.

- SetTargetCodePage indicates whether the string with the converted encoding should set the code page for the result. The default value for the argument is False. The SetTargetCodePage argument is ignored when ToEncoding is the UTF-8 encoding ('utf8'). The code page is always set to CP_UTF8 (65001) when UTF-8 encoding is used in the result. + SetTargetCodePage indicates whether the string with the converted encoding should set the code page for the result. The default value for the argument is False. The SetTargetCodePage argument is ignored when ToEncoding is the UTF-8 encoding ('utf8'). The code page is always set to CP_UTF8 (65001) when UTF-8 encoding is used in the result.

For platforms where libiconv is enabled, the iconvert routine is used as a fallback when an encoding conversion routine was not found. @@ -402,11 +421,15 @@ Encoding name for the converted value. - True if the code page should be set for the converted value. Default is False. + + True if the code page should be set for the converted value. Default is False. + - Gets the name for the default text encoding used on the platform or operating system. + + Gets the name for the default text encoding used on the platform or operating system. +

GetDefaultTextEncoding gets the default encoding name used for text from the DefaultTextEncoding variable (in the unit implementation), when assigned. Otherwise, platform-specific routines are used to get return value like: GetWindowsEncoding, GetUnixEncoding. The value in the EncodingUTF8 constant is used for the Darwin platforms. The return value contains the encoding used for AnsiString in the FPC RTL, and is retained in the DefaultTextEncoding variable for subsequent calls to the routine. @@ -444,7 +467,9 @@ - Converts the specified encoding name to lowercase and removes '-' characters. + + Converts the specified encoding name to lowercase and removes '-' characters. +

Converts a value like 'UTF-8' to 'utf8', or 'ISO-8859-1' to 'iso88591'. @@ -517,7 +542,9 @@ UTF-8-encoded string value converted in the routine. - True to set the target code page, False if the code page is not needed. + + True to set the target code page, False if the code page is not needed. + @@ -573,7 +600,7 @@ ConvertUTF8ToAnsi is a TConvertUTF8ToEncodingFunc variable with the routine used to convert a string value from UTF-8 encoding to ANSI encoding. A routine which implements the TConvertUTF8ToEncodingFunc interface can be assigned to ConvertUTF8ToAnsi to the conversion.

- The arguments to the routine include the UTF-8-encoded string converted in the function, and a boolean argument which indicates if the code page should be set for the string in the return value. Set the SetTargetCodePage parameter to True to set the code page for the ANSI string in the return value. The default value for the argument is False. + The arguments to the routine include the UTF-8-encoded string converted in the function, and a boolean argument which indicates if the code page should be set for the string in the return value. Set the SetTargetCodePage parameter to True to set the code page for the ANSI string in the return value. The default value for the argument is False.

By default, a routine is NOT assigned to ConvertUTF8ToAnsi. @@ -623,6 +650,22 @@ String with the value in ISO 8859-1 encoding. + + Converts an ISO 8859-14-encoded string to UTF-8 encoding. + +

+ Calls SingleByteToUTF8 to convert the specified string using the character translation array in ArrayISO_8859_14ToUTF8. +

+
+ +
+ + UTF-8-encoded value for the specified string. + + + String with the value in ISO 8859-14 encoding. + + Converts an ISO 8859-15-encoded string to UTF-8. @@ -960,6 +1003,7 @@ ArrayISO_8859_1ToUTF8 + ArrayISO_8859_14ToUTF8 ArrayISO_8859_15ToUTF8 ArrayISO_8859_2ToUTF8 ArrayCP1250ToUTF8 @@ -1064,7 +1108,9 @@ - UTF-8-encoded string value after the BOM is inserted at the beginning of the string. + + UTF-8-encoded string value after the BOM is inserted at the beginning of the string. + UTF8-encoded string value updated in the routine. @@ -1077,7 +1123,7 @@ UTF8ToISO_8859_1 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-1 (Central European) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-1 code page (28591). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-1 code page (28591). 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_1 to perform character conversions needed for the target encoding. @@ -1100,7 +1146,41 @@ - True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + + + + + Converts a string from UTF-8 encoding to ISO 8859-14. + +

+ UTF8ToISO_8859_14 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-14 (Latin-8 / Celtic) encoding. +

+

+ For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-14 code page (28604). 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_14 to perform character conversions needed for the target encoding. +

+

+ UTF8ToISO_8859_14 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. +

+ + + + + SetCodePage + +
+ + String value after conversion to ISO 8859-14. + + + UTF-8-encoded string value converted in the routine. + + + + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. @@ -1111,7 +1191,7 @@ UTF8ToISO_8859_15 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-15 (Western European) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-15 code page (28605). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-15 code page (28605). 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_15 to perform character conversions needed for the target encoding. @@ -1134,7 +1214,7 @@ - True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. @@ -1145,7 +1225,7 @@ UTF8ToISO_8859_2 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-2 (Eastern European) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-2 code page (28592). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-2 code page (28592). 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_2 to perform character conversions needed for the target encoding. @@ -1168,7 +1248,7 @@ - True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. @@ -1179,7 +1259,7 @@ UTF8ToISO_8859_9 is a RawByteString function used to convert a UTF-8-encoded string to the ISO 8859-9 (Turkish) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-9 code page (28599). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the ISO 8859-9 code page (28599). 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_9 to perform character conversions needed for the target encoding. @@ -1202,7 +1282,7 @@ - True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. @@ -1213,7 +1293,7 @@ UTF8ToCP1250 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1250 (Central European) encoding.

- UTF8ToCP1250 calls the UTF8ToSingleByte routine using UnicodeToCP1250 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 UnicodeToCP1250 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1250 in the return value. + UTF8ToCP1250 calls the UTF8ToSingleByte routine using UnicodeToCP1250 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 UnicodeToCP1250 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1250 in the return value.

UTF8ToCP1250 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1233,7 +1313,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1244,7 +1324,7 @@ UTF8ToCP1251 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1251 (Cyrillic) encoding.

- UTF8ToCP1251 calls the UTF8ToSingleByte routine using UnicodeToCP1251 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 (#152) to the target code page. The character translation table in UnicodeToCP1251 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1251 in the return value. + UTF8ToCP1251 calls the UTF8ToSingleByte routine using UnicodeToCP1251 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 (#152) to the target code page. The character translation table in UnicodeToCP1251 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1251 in the return value.

UTF8ToCP1251 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1264,7 +1344,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1275,7 +1355,7 @@ UTF8ToCP1252 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1252 (Latin 1) encoding.

- UTF8ToCP1252 calls the UTF8ToSingleByte routine using UnicodeToCP1252 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 (#128) to the target code page. The character translation table in UnicodeToCP1252 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1252 in the return value. + UTF8ToCP1252 calls the UTF8ToSingleByte routine using UnicodeToCP1252 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 (#128) to the target code page. The character translation table in UnicodeToCP1252 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1252 in the return value.

UTF8ToCP1252 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1295,7 +1375,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1306,7 +1386,7 @@ 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 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. @@ -1326,7 +1406,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1337,7 +1417,7 @@ UTF8ToCP1254 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1254 (Turkish) encoding.

- UTF8ToCP1254 calls the UTF8ToSingleByte routine using UnicodeToCP1254 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 UnicodeToCP1254 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1254 in the return value. + UTF8ToCP1254 calls the UTF8ToSingleByte routine using UnicodeToCP1254 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 UnicodeToCP1254 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1254 in the return value.

UTF8ToCP1254 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1357,7 +1437,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1368,7 +1448,7 @@ UTF8ToCP1255 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1255 (Hebrew) encoding.

- UTF8ToCP1255 calls the UTF8ToSingleByte routine using UnicodeToCP1255 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 UnicodeToCP1255 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1255 in the return value. + UTF8ToCP1255 calls the UTF8ToSingleByte routine using UnicodeToCP1255 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 UnicodeToCP1255 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1255 in the return value.

UTF8ToCP1255 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1388,7 +1468,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1399,7 +1479,7 @@ UTF8ToCP1256 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1256 (Arabic) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the Arabic code page (1256). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the Arabic code page (1256). 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 UnicodeToCP1256 to perform character conversions needed for the target encoding. @@ -1422,7 +1502,7 @@ - True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. + True if the target code page is set in the return value, False if the default system code page (CP_ACP) is used. @@ -1433,7 +1513,7 @@ UTF8ToCP1257 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1257 (Baltic) encoding.

- UTF8ToCP1257 calls the UTF8ToSingleByte routine using UnicodeToCP1257 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 UnicodeToCP1257 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1257 in the return value. + UTF8ToCP1257 calls the UTF8ToSingleByte routine using UnicodeToCP1257 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 UnicodeToCP1257 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1257 in the return value.

UTF8ToCP1255 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1453,7 +1533,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1464,7 +1544,7 @@ UTF8ToCP1258 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 1258 (Vietnamese) encoding.

- UTF8ToCP1258 calls the UTF8ToSingleByte routine using UnicodeToCP1258 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 UnicodeToCP1258 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1258 in the return value. + UTF8ToCP1258 calls the UTF8ToSingleByte routine using UnicodeToCP1258 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 UnicodeToCP1258 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 1258 in the return value.

UTF8ToCP1258 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1484,7 +1564,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1495,7 +1575,7 @@ UTF8ToCP437 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 437 (DOS Latin US) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Latin US code page (437). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Latin US code page (437). 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 UnicodeToCP437 to perform character conversions needed for the target encoding. @@ -1518,7 +1598,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1529,7 +1609,7 @@ UTF8ToCP850 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 850 (DOS Western Europe) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Western Europe code page (850). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Western Europe code page (850). 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 UnicodeToCP850 to perform character conversions needed for the target encoding. @@ -1552,7 +1632,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1563,7 +1643,7 @@ UTF8ToCP852 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 852 (DOS Central Europe) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Central Europe code page (852). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Central Europe code page (852). 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 UnicodeToCP852 to perform character conversions needed for the target encoding. @@ -1586,7 +1666,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1597,7 +1677,7 @@ UTF8ToCP866 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 866 (DOS Cyrillic Russian) encoding.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Cyrillic Russian code page (866). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the DOS Cyrillic Russian code page (866). 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 UnicodeToCP866 to perform character conversions needed for the target encoding. @@ -1620,7 +1700,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1631,7 +1711,7 @@ UTF8ToCP874 is a RawByteString function used to convert a UTF-8-encoded string to the Code Page 874 (Thai) encoding.

- UTF8ToCP874 calls the UTF8ToSingleByte routine using UnicodeToCP874 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 UnicodeToCP874 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 874 in the return value. + UTF8ToCP874 calls the UTF8ToSingleByte routine using UnicodeToCP874 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 UnicodeToCP874 is used instead. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 874 in the return value.

UTF8ToCP874 is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1651,7 +1731,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1662,7 +1742,7 @@ UTF8ToKOI8R is a RawByteString function used to convert a UTF-8-encoded string to the KOI8-R (Russian Cyrillic 8-bit) encoding. KOI8R stands for Kod Obmena Informatsiey, 8-bit Russian.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the KOI8-R code page (20866). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the KOI8-R code page (20866). 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 UnicodeToKOI8R to perform character conversions needed for the target encoding. @@ -1681,7 +1761,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1692,7 +1772,7 @@ UTF8ToKOI8U is a RawByteString function used to convert a UTF-8-encoded string to the KOI8-U (Russian Ukranian 8-bit) encoding. KOI8R stands for Kod Obmena Informatsiey, 8-bit Ukranian.

- For platforms where system code pages are enabled, SetCodePage is called to convert the value to the KOI8-U code page (21866). If SetTargetCodePage is False, SetCodePage is called again to apply the CP_ACP (ANSI) code page in the return value. + For platforms where system code pages are enabled, SetCodePage is called to convert the value to the KOI8-U code page (21866). 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 UnicodeToKOI8U to perform character conversions needed for the target encoding. @@ -1711,7 +1791,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1722,7 +1802,7 @@ UTF8ToKOI8RU is a RawByteString function used to convert a UTF-8-encoded string to the KOI8RU (Russian, Belarusian, Ukranian Cyrillic) encoding.

- UTF8ToKOI8RU calls the UTF8ToSingleByte routine using UnicodeToKOI8RU to perform character conversions needed for the target encoding. System code pages are not used (when enabled) because KOI8RU does not have an official code page. The character translation table in UnicodeToKOI8RU is used to convert character values for the encoding. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 0 in the return value. + UTF8ToKOI8RU calls the UTF8ToSingleByte routine using UnicodeToKOI8RU to perform character conversions needed for the target encoding. System code pages are not used (when enabled) because KOI8RU does not have an official code page. The character translation table in UnicodeToKOI8RU is used to convert character values for the encoding. When SetTargetCodePage is True, SetCodePage is called (without character conversion) to set the code page to 0 in the return value.

UTF8ToKOI8RU is used in the implementation of the ConvertEncodingFromUTF8 encoding conversion routine. @@ -1738,7 +1818,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1749,7 +1829,7 @@ 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 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. @@ -1768,7 +1848,7 @@ - True if the target code page is set in the return value, False if a code page is not used. + True if the target code page is set in the return value, False if a code page is not used. @@ -1802,6 +1882,8 @@