QTextCodec: update the docs for codecForUtfText
It can detect the standard UTF codecs, but not non-standard like UTF-7[1], UTF-9 or UTF-18[2]. [1] https://tools.ietf.org/html/rfc2152 [2] https://tools.ietf.org/html/rfc4042 Fixes: QTBUG-67188 Change-Id: If7e743cf8476463880ccfffd155f853dc947421a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
570ef11c28
commit
66a2d15907
|
|
@ -1164,9 +1164,19 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba)
|
|||
|
||||
Tries to detect the encoding of the provided snippet \a ba by
|
||||
using the BOM (Byte Order Mark) and returns a QTextCodec instance
|
||||
that is capable of decoding the text to unicode. If the codec
|
||||
cannot be detected from the content provided, \a defaultCodec is
|
||||
returned.
|
||||
that is capable of decoding the text to unicode. This function can
|
||||
detect one of the following codecs:
|
||||
|
||||
\list
|
||||
\li UTF-32 Little Endian
|
||||
\li UTF-32 Big Endian
|
||||
\li UTF-16 Little Endian
|
||||
\li UTF-16 Big Endian
|
||||
\li UTF-8
|
||||
\endlist
|
||||
|
||||
If the codec cannot be detected from the content provided, \a defaultCodec
|
||||
is returned.
|
||||
|
||||
\sa codecForHtml()
|
||||
*/
|
||||
|
|
@ -1209,8 +1219,19 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaul
|
|||
|
||||
Tries to detect the encoding of the provided snippet \a ba by
|
||||
using the BOM (Byte Order Mark) and returns a QTextCodec instance
|
||||
that is capable of decoding the text to unicode. If the codec
|
||||
cannot be detected, this overload returns a Latin-1 QTextCodec.
|
||||
that is capable of decoding the text to unicode. This function can
|
||||
detect one of the following codecs:
|
||||
|
||||
\list
|
||||
\li UTF-32 Little Endian
|
||||
\li UTF-32 Big Endian
|
||||
\li UTF-16 Little Endian
|
||||
\li UTF-16 Big Endian
|
||||
\li UTF-8
|
||||
\endlist
|
||||
|
||||
If the codec cannot be detected from the content provided, this overload
|
||||
returns a Latin-1 QTextCodec.
|
||||
|
||||
\sa codecForHtml()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue