final class UnicodeEscapes
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Replaces the Unicode escapes of U&'...' strings and U&"..." identifiers.

Rule: PG-LEX-UNICODE-001. An escape is the escape character followed by four hexadecimal digits, or by + and six; the escape character written twice stands for itself. A surrogate pair written as two escapes is one character. The result is UTF-8, the server encoding the profile fixes. The server rejects a malformed escape, a lone surrogate and code point zero while scanning, so they are SQL outside the grammar. Source: https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-UESCAPE. Status: Implemented.

Methods§

public function decode(string $text, string $escape): string

Test cases 7§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 7

Relations§

Instantiated in 4
Method calls 4