In this simple code I have trouble with Unicode:
QString qs = QFileDialog::getOpenFileName(0,"","","");
std::string str = qs.toUtf8().constData();
Mat m = imread(str);
When qs is Latin char set it works fine, but when path contains Cyrillic chars I obtain a bad conversion. As sample: qs "E:/Кирилиця_49.png": str "E:/Кирилиця_49.png"
I know that happens when str is not on UTF-8 characters set, but in project properties the "Character Set" property is "Use Unicode Character Set". Compiler MSVC 2010, Qt 5.3.2. What could be the problem?