Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot play file if path has accented character #880

Closed
shankarsivarajan opened this issue May 8, 2021 · 4 comments · Fixed by #889
Closed

Cannot play file if path has accented character #880

shankarsivarajan opened this issue May 8, 2021 · 4 comments · Fixed by #889

Comments

@shankarsivarajan
Copy link

FluidSynth version

FluidSynth runtime version 2.2.1
Copyright (C) 2000-2021 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of Creative Technology Ltd.

FluidSynth executable version 2.2.1
Sample type=float

Describe the bug

I'm using the latest release of fluidsynth, 2.2.1, on Windows 10.
When I try to open a file named, say, "filé.mid", with 'fluidsynth.exe "\path\to\soundfont.sf2" "\path\to\filé.mid"', I get an error message: "Parameter '\path\to\filΘ.mid' not a SoundFont or MIDI file or error occurred identifying it."
Renaming the file (or the folder it is in if that's the one with the accented character) solves the problem.

Expected behavior

The file plays normally.

Steps to reproduce

Run fluidsynth.exe on a midi file with an accented character in the path.

Additional context

If you are able to illustrate the bug with an example, please provide simple
source code below or as attached file. List any other information that is relevant to your issue, e.g. stack traces, related issues, build logs, suggestions on how to fix, links to related discussions at fluid-dev, etc.

insert code snippets, soundfonts or anything relevant here, or attach it as extra file(s) if it's too much
@derselbst
Copy link
Member

Fluidsynth expects an UTF8 encoded string. Now the big challenge is how to convince cmd.exe to pass arguments as UTF8. Although this can be done with chcp 65001, it doesn't work for me. Maybe @jjceresa has an idea.

@derselbst derselbst removed the bug label May 9, 2021
@jjceresa
Copy link
Collaborator

jjceresa commented May 9, 2021

Now the big challenge is how to convince cmd.exe to pass arguments as UTF8...Maybe @jjceresa has an idea.

Unfortunately I haven't a direct or simple solution to propose. Usually, to avoid complication I use UTF8 file path most of the time on any files system. Sorry.

@derselbst
Copy link
Member

I've added a few more UTF8 test cases to test àccèntèd characters. The tests are passing - even on Windows. Also, I've tested it manually on the Bash in Linux and it works fine. I don't see how this is a limitation of fluidsynth. It's rather a problem related to Windows doing fancy conversions under the hood. If you eventually get it working, you're welcome to enlighten us.

@shankarsivarajan
Copy link
Author

shankarsivarajan commented Sep 3, 2021

My workaround is to change working directories to the problematic folder, and run fluidsynth from there. That works as long as the files themselves have normal names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants