QFileSystemModel Unicode support [solved]
In our project, we are using the QFileSystemModel to show images in a QListView. The QFileSystemModel is extended with a custom QFileIconProvider for compressing smaller/low res JPG icons. This is working fine for non-Unicode file names.
Now we are adding support for Unicode, but the model seems to filter out the Unicode characters. For example: i have a file called "Image箇32". A call to the icon provider reveals a file name "Image32" .. the 箇 is simply gone. This results in incorrect behaviour.
The same happens with QFileSystemModel::filePath(modelIndex), this also returns the incorrect string.
The problem has been solved, the LC_ALL definition was incorrect. This was set to C instead of en_US.UTF8.
Hi and welcome to devnet,
Glad you found out and thanks for sharing !
Can you also please update the thread title prepending [solved] ? So other forum user may know a solution has been found :)
Happy coding !