Reputation: 143
According to the documentation QString's toUpper() and toLower() member functions convert in the C-locale. Does it mean that only Posix Portable Character Set characters (Latin A-Z/a-z) are converted and any international unicode characters are left as-is?
Upvotes: 1
Views: 2332
Reputation: 851
We can easily test this with the simple test program here:
#include <QString>
#include <iostream>
int main()
{
QString s("БΣTest3φب");
std::cout << "String: " << s.toStdString() << std::endl;
std::cout << "Lower: " << s.toLower().toStdString() << std::endl;
std::cout << "Upper: " << s.toUpper().toStdString() << std::endl;
return 0;
}
Which returns:
09:48:48: Starting /home/tzig/test/test ...
String: БΣTest3φب
Lower: бσtest3φب
Upper: БΣTEST3Φب
09:48:49: /home/tzig/test/test exited with code 0
So we know that:
Feel free to test other Unicode characters with the test program.
Upvotes: 3