Unit 'LazUTF8' Package
[Overview][Types][Classes][Procedures and functions][Variables][Index] [#lazutils]

Reference for unit 'LazUTF8': Procedures and functions

CompareStrListUTF8LowerCase

  

Compares the specified lines of text in a TStringList.

ConsoleToUTF8

  

Converts an OEM-encoded string to UTF8.

ConvertUTF16ToUTF8

  

Converts values from UTF-16 encoding to UTF-8 encoding.

ConvertUTF8ToUTF16

  

Converts values from UTF-8 encoding to UTF-16 encoding.

FindInvalidUTF8Character

  

Returns -1 if OK, otherwise byte index of invalid UTF-8 codepoint.

FindInvalidUTF8Codepoint

  

Finds the position where an invalid UTF-8 codepoint is found in the string.

GetEnvironmentStringUTF8

  

Returns a system environment string.

GetEnvironmentVariableCountUTF8

  

Returns the number of system environment variables.

GetEnvironmentVariableUTF8

  

Returns the value of a system environment variable.

IsPureAscii

  

Determines whether the specified string contains only single-byte ASCII characters.

LazGetLanguageIDs

  

Deprecated. Use the GetLanguageID function from the translations.pas unit instead.

LazGetShortLanguageID

  

Deprecated. Use the GetLanguageID function from the translations.pas unit instead.

NeedRTLAnsi

  

Indicates if the OS requires use of AnsiToUTF8 and UTF8ToAnsi for the RTL.

ParamStrUTF8

  

Converts the specified command line parameter to a UTF-8-encoded string.

SetNeedRTLAnsi

  

Sets the value for the unit global variable.

SysErrorMessageUTF8

  

Gets the UTF-8-encoded system error message for the specified error code.

SysToUTF8

  

Converts strings (and format settings) from the system codepage to UTF-8.

UnicodeToUTF8

  

Encodes the given code point as an UTF-8 sequence of 1 to 4 bytes.

UnicodeToUTF8Inline

  

Encodes the given code point as an UTF-8 sequence of 1 to 4 bytes.

UnicodeToUTF8SkipErrors

  

Stores a single Unicode codepoint as a UTF-8-encoded value in the buffer.

UTF16ToUTF8

  

Converts a UTF-16-encoded string (system endian) to UTF-8 encoding.

UTF8AddChar

  

Adds the specified number of UTF-8 codepoints to a string.

UTF8AddCharR

  

Appends the specified number of UTF-8 codepoints to a string.

UTF8CharacterLength

  

Returns the number of bytes needed for the UTF-8 codepoint starting at p.

UTF8CharacterStrictLength

  

Returns the length in bytes (1..4) for a valid UTF-8 character. Otherwise 0.

UTF8CharacterToUnicode

  

Returns the codepoint at p and the number of bytes to skip.

UTF8CharStart

  

Deprecated. Use UTF8CodepointStart instead.

UTF8CharToByteIndex

  

Deprecated. Use UTF8CodepointToByteIndex instead.

UTF8CodepointSize

  

Returns the size of the UTF-8 codepoint in bytes.

UTF8CodepointSizeFast

  

Fast version of UTF8CodepointSize.

UTF8CodepointStart

  

Finds the n-th UTF-8 codepoint.

UTF8CodepointStrictSize

  

Gets the number of bytes needed for the UTF-8 codepoint.

UTF8CodepointToByteIndex

  

Finds the byte index of the n-th UTF-8 codepoint.

UTF8CodepointToUnicode

  

Converts a UTF-8-encoded character to its unique Unicode U+XXXX character value.

UTF8CompareLatinTextFast

  

Deprecated. Use UTF8CompareText or AnsiCompareText instead.

UTF8CompareStr

  

Compares the UTF-8-encoded string values.

UTF8CompareStrCollated

  

Deprecated. Use UTF8CompareStr instead.

UTF8CompareStrP

  

Compares the specified PChar values.

UTF8CompareText

  

Case-insensitive comparison of two UTF-8-encoded values.

UTF8CompareTextP

  

Performs a case-insensitive comparision for the specified UTF-8-encoded PChar values.

UTF8Copy

  

Copies the specified number of codepoints from the UTF-8-encoded string.

UTF8CStringToUTF8String

  

Copies from a C-style string with UTF-8 encoding to UTF-8 string.

UTF8Delete

  

Deletes characters (or codepoints) in a UTF-8-encoded string.

UTF8EndsText

  

Determines if a string ends with the specified value.

Utf8EscapeControlChars

  

Translates control characters in a UTF-8-encoded string into human readable format.

UTF8FindNearestCharStart

  

Finds the start of the UTF-8 character at the specified position.

UTF8FixBroken

  

Replaces all invalid UTF-8 characters with spaces.

UTF8Insert

  

Inserts the specified values into a string at the given position.

UTF8LeftStr

  

Gets the specified number of characters (codepoints) at the start of the string.

UTF8Length

  

Gets the length of a UTF-8-encoded string in codepoints.

UTF8LengthFast

  

Fast version of UTF8Length.

UTF8LowerCase

  

Converts the specified string to lowercase using Unicode case mapping rules.

UTF8LowerString

  

Converts the specified string to lowercase using Unicode case mapping rules.

UTF8PadCenter

  

Center aligns a string to the specified length.

UTF8PadLeft

  

Adds the specified number of values in AUtf8Char to the beginning of a string.

UTF8PadRight

  

Appends the specified number of UTF-8 codepoints to the end of a string.

UTF8Pos

  

Returns the character index where the search text starts in the string.

UTF8PosP

  

Returns a pointer to the position where SearchForText starts in SearchInText, or Nil when not found.

UTF8ProperCase

  

Capitalizes the first letter of each word in the string.

UTF8QuotedStr

  

Performs safe quoting for the specified UTF-8-encoded string value.

UTF8ReverseString

  

Reverses the order of codepoints in the specified string.

UTF8RightStr

  

Gets the specified number of characters (codepoints) at the end of the string.

UTF8RPos

  

Gets the right-most position in the Source string for the value in Substr.

UTF8StartsText

  

Determines if a string starts with the specified value.

UTF8StringOfChar

  

Creates a string filled with the specified number of given codepoints.

UTF8StringReplace

  

Replaces values in a String matching a pattern starting at a given position.

UTF8SwapCase

  

Provides a simplistic implementation of UTF8UpperCase and UTF8LowerCase.

UTF8ToConsole

  

Converts a UTF-8-encoded string to console (OEM) encoding.

UTF8ToDoubleByte

  

Converts a UTF-8-encode string to its DBCS representation.

UTF8ToDoubleByteString

  

Converts UTF-8 values to their DBCS equivalent.

UTF8ToSys

  

Ensures UTF-8 characters (or format settings) are converted to the system code page.

UTF8ToUTF16

  

Converts the UTF-8 encoded string to UTF-16 encoding (system endian).

UTF8ToWinCP

  

Converts the UTF-8-encoded string to the Windows code page encoding.

UTF8Trim

  

Removes leading and trailing whitespace or control characters.

Utf8TryFindCodepointStart

  

Tries to find the start of a valid UTF-8 codepoint in a string.

UTF8UpperCase

  

Converts the specified string to uppercase using Unicode case mapping rules.

UTF8UpperString

  

Inline variant of UTF8UpperCase.

UTF8WrapText

  

Creates a word-wrapped version of the specified string.

WinCPToUTF8

  

Converts the string from Windows code page to UTF-8.