compressonator icon indicating copy to clipboard operation
compressonator copied to clipboard

It seems the program crashes when non-ASCII symbols are present in the full path

Open elderkeltir opened this issue 3 years ago • 1 comments

Hey there, I have windows user name in non-ASCII symbols, and when I try to convert texture to png from there - the program exits at the moment I add destination to a file. When I put this very source file into another folder - everything works just fine.

I can't check it for sure, but most likely the fullpath containing non-ASCII symbols is the root cause. It's minor issue, still decided to report. Fullpath for test: "C:\Users\Глядач\Downloads\95-textures\Textures"

elderkeltir avatar Nov 01 '22 11:11 elderkeltir

@Esentiel This code uses standard ASCII characters for the path. Using a path containing non-ASCII symbols is the cause. The CLI application uses as entry main(int argc, char* argv[]) for command line parameter processing, and the path argv for "C:\Users\Глядач\Downloads\95-textures\Textures" is given as "C:\Users??????\Downloads\95-textures\Textures". So the CLI cannot find the actual path to load files.

To fix this, the main entrance of the code needs to use the wide character set main(int argc, wchar_t* argv[]), however, other parts of the code also uses argv passing such as QCoreApplication app(argc, argv) which has to have support for wide char. Various other code changes would need to be investigated to resolve this issue.

NPCompress avatar Nov 01 '22 13:11 NPCompress