1 To allow opening files on Unicode paths on Windpws, expect passed 8-bit
2 strings to be UTF-8-encoded, and convert them to wchar_t. Fallback to
3 ACP strings for backward compatibility.
5 diff --git a/src/Numbertext.cxx b/src/Numbertext.cxx
6 --- a/src/Numbertext.cxx
7 +++ b/src/Numbertext.cxx
9 bool readfile(const std::string& filename, std::wstring& result)
12 - std::ifstream ifs(filename);
13 + // First try to convert from UTF-8
14 + std::ifstream ifs(Numbertext::string2wstring(filename));
15 + // Fallback to ACP string for backward compatibility