Commit bb149fd3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix extract charset

parent 07380825
/*******************************************************************************
/*******************************************************************************
**
** Filename : util
** Created on : 03 April, 2005
......@@ -743,9 +743,12 @@ QByteArray Util::htmlCodec(const QByteArray &data, const QByteArray &codec)
if (currentCodec.isEmpty()) {
currentCodec = QByteArray("UTF-8");
}
//qDebug() << " codecValue ******************************************: " << codecValue;
if (data.contains("<meta charset=\"utf-8\">")) {
if (data.contains("charset=\"utf-8\"")
|| data.contains("charset=\"UTF-8\"")
|| data.contains("charset=UTF-8")) {
currentCodec = QByteArray("UTF-8");
}
//qDebug() << " codec ******************************************: " << codec << " currentCodec : " <<currentCodec;
return currentCodec;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment