Correct which codecs QTextStream::autoDetectUnicode detects

Fixes: QTBUG-67187
Change-Id: If7e743cf8476463880ccfffd155f86b78a279f81
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
bb10
Thiago Macieira 2018-10-20 21:55:20 -07:00
parent 99baa0d440
commit f80ed83cd9
1 changed files with 6 additions and 6 deletions

View File

@ -3111,15 +3111,15 @@ QTextCodec *QTextStream::codec() const
}
/*!
If \a enabled is true, QTextStream will attempt to detect Unicode
encoding by peeking into the stream data to see if it can find the
UTF-16 or UTF-32 BOM (Byte Order Mark). If this mark is found, QTextStream
will replace the current codec with the UTF codec.
If \a enabled is true, QTextStream will attempt to detect Unicode encoding
by peeking into the stream data to see if it can find the UTF-8, UTF-16, or
UTF-32 Byte Order Mark (BOM). If this mark is found, QTextStream will
replace the current codec with the UTF codec.
This function can be used together with setCodec(). It is common
to set the codec to UTF-8, and then enable UTF-16 detection.
\sa autoDetectUnicode(), setCodec()
\sa autoDetectUnicode(), setCodec(), QTextCodec::codecForUtfText()
*/
void QTextStream::setAutoDetectUnicode(bool enabled)
{
@ -3131,7 +3131,7 @@ void QTextStream::setAutoDetectUnicode(bool enabled)
Returns \c true if automatic Unicode detection is enabled, otherwise
returns \c false. Automatic Unicode detection is enabled by default.
\sa setAutoDetectUnicode(), setCodec()
\sa setAutoDetectUnicode(), setCodec(), QTextCodec::codecForUtfText()
*/
bool QTextStream::autoDetectUnicode() const
{