QString Utf8 and latin1 difference
I am using QT-5.
I have used the below code:
QString str1= QString::fromLatin1("abc÷ßàéöø");
QString str= QString::fromUtf8("abc÷ßàéöø");
This always results in false.
Why is it like this?
Internally QString should be in same format,its character pointer which have different format,for which we use fromLatin1 or fromUtf8.
In fact you test the encoding of your source editor.
Results of str and str1 with utf8 or Latin1 encodings set in QtCreator:
"abc������" "abc÷ßàéöø" -> latin1
"abc÷ßàéöø" "abcÃ·Ã\u009FÃ Ã©Ã¶Ã¸" -> utf8
Does this mean that latin1 and utf8 strings which are converted from character pointers won't be same if it's having extended acsii characters?