ModPlug Central

OpenMPT Development (Archive) => Bug Reports => Bug Report Archive => Topic started by: le_parasite on March 11, 2008, 02:19:08

Title: 1.17.02.48 load sample fails with special character
Post by: le_parasite on March 11, 2008, 02:19:08
Full Version:
OpenMPT v1.17.02.48

Has the bug occured in previous versions?
I dont know



Description of the bug:

maybe due to some windows bug, but when you try to load a sample with special "letter", the sample won't load.

How often does it happen?:

always

How to reproduce (step by step description):

name a sample "Dvořák.wav" and try to upload it.

Edit: More information is available on the issue tracker (http://bugs.openmpt.org/view.php?id=164).
Title: .48 load sample fails with special character
Post by: Saga Musix on March 11, 2008, 13:01:45
Hm, i sense unicode incompatiblities here...
Title: .48 load sample fails with special character
Post by: Sam_Zen on March 11, 2008, 23:15:48
I guess so too.
Title: .48 load sample fails with special character
Post by: Saga Musix on October 13, 2008, 20:13:25
The strange thing is that this filename is always passed as "Dvorák.wav" to MPT, not only when opening a sample but also in the treeview... So maybe the WinApi passes a "optimized for non-unicode platforms" version of that string to modplug...?
Title: .48 load sample fails with special character
Post by: LPChip on October 14, 2008, 06:10:10
The ř char isn't part of the standard ascii table. Its an extended char, whereas the á is part of the standard ascii table.

And by standard, I mean 0-255.
Title: .48 load sample fails with special character
Post by: Saga Musix on October 14, 2008, 09:41:40
I know that! :nuts: But I'm not sure what causes the bug here, maybe I have to learn about more about string types in C++....
Title: .48 load sample fails with special character
Post by: bvanoudtshoorn on October 14, 2008, 10:15:40
I'd guess that it's a conversion issue; ie, the filename's represented in format x in the system, is converted to format y for modplug, and then modplug tries to open the file using format y, and the system complains. But I'm just guessing.

This MSDN section (http://msdn.microsoft.com/en-us/library/aa363879(VS.85).aspx) might be useful, though.
Title: .48 load sample fails with special character
Post by: Saga Musix on October 14, 2008, 12:13:41
Well, the filename is retrieved from a CFileDialog object. I directly tried to route that filename to a MessageBox (without a temporary variable) and it was still non-unicode.
Title: .48 load sample fails with special character
Post by: LPChip on October 14, 2008, 13:35:09
So this dialog gives the wrong filename back? Maybe there's a setting in the dialog to enable it. Otherwise, the control needs to be updated.
Title: Re: 1.17.02.48 load sample fails with special character
Post by: Saga Musix on August 22, 2011, 19:27:47
I'll close this one as a related issue (http://bugs.openmpt.org/view.php?id=164) has been posted on the issue tracker.