Hello everyone.
I migrated my files (.txt) from Windows (ISO-8859) to Linux (UTF-8).
Replace command is not recognizing the accented character.
file.
open(QIODevice::ReadOnly|QIODevice
::Text);
QString str
= in.
readAll().
trimmed();
file.close();
const char tA[4] = {'á','â','ã','à '};
for (int j = 0; j < (int)sizeof(tA); j++) str.replace(tA[j],"a");
QFile file(fileName);
file.open(QIODevice::ReadOnly|QIODevice::Text);
QTextStream in(&file);
QString str = in.readAll().trimmed();
file.close();
const char tA[4] = {'á','â','ã','à '};
for (int j = 0; j < (int)sizeof(tA); j++) str.replace(tA[j],"a");
To copy to clipboard, switch view to plain text mode
Does anyone know what command I have to use or add?
Thanks!
Bookmarks