UNISTR

Interprets \XXXX escape sequences within a string.

This function corresponds to the unistr(X) function in SQLite. It processes the input string X and replaces any occurrence of \XXXX (where X is a hexadecimal digit) with the corresponding Unicode character.

  • The escape sequence must consist of a backslash followed by exactly four hexadecimal digits.

  • If a backslash is followed by anything other than four hex digits, the backslash is treated as a literal character.

This is useful for inserting special characters into a string using their Unicode code points.

Example

// SELECT unistr('Hello\0020World') -> 'Hello World' (U+0020 is a space)
// SELECT unistr('The euro sign is \20AC') -> 'The euro sign is €'
val processedString = select(UNISTR(StringLiteral("Test\\00A9"))) // Results in "Test©"

Return

A KQLiteColumn of type String with escape sequences converted to characters, or NULL if the input is NULL.

Author

MOHAMMAD AZIM ANSARI

Parameters

column

The column or string value containing potential \XXXX escape sequences.

See also