Add note about Latin1StringView in UTF-8 source
Pick-to: 6.7 Task-number: QTBUG-77020 Change-Id: I903917a000b21bc7502bf257f759bbfc71f10d45 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit f4076f1058b97f92f65d668a274aa3bbd6d302f7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d9a8caca47
commit
1212298fb4
@ -69,6 +69,13 @@
|
|||||||
in the first place. In those cases, using QStringLiteral may be
|
in the first place. In those cases, using QStringLiteral may be
|
||||||
the better option.
|
the better option.
|
||||||
|
|
||||||
|
\note Only US-ASCII literals can be used in QLatin1StringView if the source
|
||||||
|
code file is encoded in UTF-8, as \l{unicode}{Qt requires}. Non-US-ASCII
|
||||||
|
literals like \c{QLatin1StringView("é")} will not be represented correctly.
|
||||||
|
You can use octal or hex notation instead:
|
||||||
|
\c{QLatin1StringView("\351")} or \c{QLatin1StringView("\xe9")},
|
||||||
|
respectively.
|
||||||
|
|
||||||
\sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral},
|
\sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral},
|
||||||
QT_NO_CAST_FROM_ASCII
|
QT_NO_CAST_FROM_ASCII
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user