docs: Link Wikipedia on C escapes in gvariant-text-format for strings

Unlike in the bytestring section there is no link to explanation.
This commit is contained in:
Jan Tojnar 2024-05-19 00:55:40 +02:00
parent 56d8f14ab2
commit 32b8a8400d

View File

@ -85,12 +85,12 @@ won't work and you'll end up with the individual characters corresponding to
each byte. each byte.
Unicode escapes of the form `\uxxxx` and `\Uxxxxxxxx` are supported, in Unicode escapes of the form `\uxxxx` and `\Uxxxxxxxx` are supported, in
hexadecimal. The usual control sequence escapes `\a`, `\b`, `\f`, `\n`, hexadecimal. The [usual control sequence escapes][C escape sequences]
`\r`, `\t` and `\v` are supported. Additionally, a `\` before a newline `\a`, `\b`, `\f`, `\n`, `\r`, `\t` and `\v` are supported.
character causes the newline to be ignored. Finally, any other character Additionally, a `\` before a newline character causes the newline to be ignored.
following `\` is copied literally (for example, `\"` or `\\`) but for Finally, any other character following `\` is copied literally
forwards compatibility with future additions you should only use this (for example, `\"` or `\\`) but for forwards compatibility with future additions
feature when necessary for escaping backslashes or quotes. you should only use this feature when necessary for escaping backslashes or quotes.
The usual octal and hexadecimal escapes `\nnn` and `\xnn` are not supported The usual octal and hexadecimal escapes `\nnn` and `\xnn` are not supported
here. Those escapes are used to encode byte values and `GVariant` strings here. Those escapes are used to encode byte values and `GVariant` strings
@ -344,3 +344,5 @@ string to be parsed. Format strings that collect multiple arguments are
permitted, so you may require more varargs parameters than the number of `%` permitted, so you may require more varargs parameters than the number of `%`
signs that appear. You can also give format strings that collect no signs that appear. You can also give format strings that collect no
arguments, but there's no good reason to do so. arguments, but there's no good reason to do so.
[C escape sequences]: https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences