Hex form works fine here (my machine is an English locale):
#include <QtCore>
#include <QDebug>
int main(int argc, char **argv)
{
wchar_t data[] = { 0x5E2, 0x5D1, 0x5E8, 0x5D9, 0x5EA, 0x0 };
qDebug() << inHebrew << "match at" << re.indexIn(inHebrew);
qDebug() << inEnglish << "match at" << re.indexIn(inEnglish); // no match
return 0;
}
#include <QtCore>
#include <QDebug>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QRegExp re("[\\x0590-\\x05ff]+");
wchar_t data[] = { 0x5E2, 0x5D1, 0x5E8, 0x5D9, 0x5EA, 0x0 };
QString inHebrew = QString::fromWCharArray(data);
qDebug() << inHebrew << "match at" << re.indexIn(inHebrew);
QString inEnglish("hebrew");
qDebug() << inEnglish << "match at" << re.indexIn(inEnglish); // no match
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks