hi,
im having a bit of trouble in detecting Ñ or alt+165 in a string..
im using str.indexOf("Ñ") but it detects different char..
how to this properly please help..
tnx
hi,
im having a bit of trouble in detecting Ñ or alt+165 in a string..
im using str.indexOf("Ñ") but it detects different char..
how to this properly please help..
tnx
I am using Qt4.4 in Kubuntu 8.04 with UTF-8 encoding as default.
This applicacion writen in a UTF-8 text file works for me.
Try it, I hope it can helps you.
Qt Code:
#include <QString> #include <TextStream> int main() { QString cadena; cadena = "aquÃ* Ñ está"; salida<<cadena.indexOf("Ñ")<<endl; }To copy to clipboard, switch view to plain text mode
Auryn
Starting to learn the world of Qt
atlast.. my problem solve by using
str.indexOf(QString::fromUtf8("Ñ"))
atleast i got the idea of utf-8 tnx
Bookmarks