public final class PowerQueryEscapeDecoder extends Object
M uses a mix of embedded-quote doubling and #(...) character
escapes. The standard forms we must support:
"" → literal " #(lf) → \n #(cr) → \r #(cr,lf) → \r\n #(tab) → \t #(XXXX) → Unicode codepoint (4 hex digits) #(XXXXXXXX) → Unicode codepoint (8 hex digits)
Any unrecognised #(…) sequence is preserved verbatim in the
output — the plan's "never silent wrong lineage" rule applies: we'd
rather leave a suspicious literal alone than silently produce a wrong
SQL string. Callers can detect such cases via PowerQueryEscapeDecoder.Result.hasWarnings().
| Modifier and Type | Class and Description |
|---|---|
static class |
PowerQueryEscapeDecoder.Result |
| Modifier and Type | Method and Description |
|---|---|
static PowerQueryEscapeDecoder.Result |
decode(String raw)
Decode the raw text inside the surrounding double quotes
of an M string literal.
|
public static PowerQueryEscapeDecoder.Result decode(String raw)