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

Support wstring #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hotwatermorning
Copy link

Enable AudioFile class to open files of which filename contains unicode characters.

On windows platform, the standard file streams can't open files with std::string if the filename of the file contains unicode characters.

Visual Studio STL has overloads which takes std::wstring for standard file streams to open such files.

std::string path = "😀😁😂.txt";
std::wstring wpath = L"😀😁😂.txt";

std::ofstream ofs1(path);  // NG.
std::ofstream ofs2(wpath); // OK.

@adamstark
Copy link
Owner

Hi there, I'd really like to support this. I keep coming back to it sporadically and wondering how to support it with a smaller footprint on the library (it's quite a lot of code for the change in string type - I wonder if there is a way to allow these to be swapped out more subtly...). Anyway, I'll have a think and will come back to you.

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

Successfully merging this pull request may close these issues.

3 participants