ZDoom / ZMusic

GZDoom's music system as a standalone library
https://forum.zdoom.org/index.php
63 stars 33 forks source link

Fluidsynth cannot load patch files from unicode folders properly #41

Closed madame-rachelle closed 1 month ago

madame-rachelle commented 2 years ago

image To reproduce, simply do a "mklink /j (your-gzdoom-folder) 試験" from the command line, then cd into 試験 and run GZDoom from there.

coelckers commented 2 years ago

FluidSynth's file handling code is a mess. From the looks of it it should be UTF-8 but with this code it is hard to tell if some of it does not,work.

coelckers commented 2 years ago

Or maybe it's the double slash...?

madame-rachelle commented 2 years ago

The best way that I can think of to address this is to throw the patch set into a temporary folder and load it from there - even if it is via a symlink - but there is no guarantee that symlinks will be available in any temporary storage, nor that the temporary storage will be behind an ascii-conforming path name. This may have to be addressed directly in fluidsynth itself.

coelckers commented 1 month ago

I just checked and with the latest version of both GZDoom and ZMusic it does load the soundfont from a directory with such a name - conversion of UTF-8 to wide chars is properly performed before opening the file successfully.

I cannot say why it didn't work for the reporter.