Created attachment 144985 [details] picture It appears garbled in the resource folder. However, it was normal on November 8.
Now this problem still exists, I tried Japanese, and a garbled file is also generated. Normal files created in previous versions cannot be read normally too.
I've tried to reproduce on Windows and on Linux, and I couldn't :-(
Created attachment 147365 [details] bug I tried turning off all plugins and using the nightly version, but the problem persists... As shown in the figure, if it is a mixed name of English + Chinese, then the English part is normal, and the Chinese becomes garbled.
After installing a traditional chinese locale, I can reproduce the problem on Windows. Though it's pretty mysterious, because we use QString all along, and when we come to the place where we actually construct a QFile object, the filename suddenly is broken -- but only for gradients, not for presets or palettes.
Git commit 08ac5112a7bfabced5a8ab2252402df1f3fa980e by Halla Rempt. Committed on 31/03/2022 at 12:29. Pushed by rempt into branch 'master'. Add temporary debug information M +8 -2 libs/resources/KisFolderStorage.cpp https://invent.kde.org/graphics/krita/commit/08ac5112a7bfabced5a8ab2252402df1f3fa980e
Git commit 959bf282a1b8e9f40acd3b10b696186c79164e0b by Halla Rempt. Committed on 31/03/2022 at 13:15. Pushed by rempt into branch 'master'. Gradients: set the QTextStreadm codec to UTF-8 M +2 -1 libs/pigment/resources/KoSegmentGradient.cpp M +1 -1 libs/pigment/resources/KoStopGradient.cpp https://invent.kde.org/graphics/krita/commit/959bf282a1b8e9f40acd3b10b696186c79164e0b
Okay, that last commit actually fixed the bug :-)
Git commit b2560ddc1547d7b25db71569d5c3e794dce12a42 by Halla Rempt. Committed on 31/03/2022 at 14:12. Pushed by rempt into branch 'krita/5.0'. Gradients: set the QTextStreadm codec to UTF-8 (cherry picked from commit 959bf282a1b8e9f40acd3b10b696186c79164e0b) M +2 -1 libs/pigment/resources/KoSegmentGradient.cpp M +1 -1 libs/pigment/resources/KoStopGradient.cpp https://invent.kde.org/graphics/krita/commit/b2560ddc1547d7b25db71569d5c3e794dce12a42