HVScrollView icon indicating copy to clipboard operation
HVScrollView copied to clipboard

Support wstring

Open hotwatermorning opened this issue 5 years ago • 1 comments

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.

hotwatermorning avatar Feb 11 '20 07:02 hotwatermorning

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.

adamstark avatar Jan 23 '21 19:01 adamstark