Reading an audio file with a foreign name

Hi, I’m using AudioFormatManager.createReaderFor() to read audio files.
However I fail when attempting to read a file with Hebrew/Arabic characters in its name.

What is the correct way to do it?

What code are you using to open the file? How is it failing?

I just copied examples/Assets/cello.wav to a file named שֶׁמַע.wav on my desktop, and then used the following code to open it. It seemed to work as expected.

Note that C++ source code must only use characters from the “basic source character set” in order to be portable between compilers. Using UTF-8 literals directly in source code is implemented as a compiler extension, if it is supported at all. If you want to hard-code UTF literals in your code, you should translate them into escape sequences which can be represented in the basic source character set. The Projucer includes a helper tool that can convert UTF strings into C++ source code under “Tools → UTF-8 String-Literal Helper” in the main menu.

int main()
    juce::AudioFormatManager afm;

    const juce::File file (juce::CharPointer_UTF8 ("~/Desktop/\xd7\xa9\xd6\xb6\xd7\x81\xd7\x9e\xd6\xb7\xd7\xa2.wav"));

    if (auto reader = juce::rawToUniquePtr (afm.createReaderFor (file)))
        DBG (reader->lengthInSamples);
        return 0;

    return 1;

That helped!
Thank you so much.