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 Unicode-filenames on Windows #195

Open
Fedr opened this issue May 24, 2021 · 2 comments
Open

Support Unicode-filenames on Windows #195

Fedr opened this issue May 24, 2021 · 2 comments

Comments

@Fedr
Copy link

Fedr commented May 24, 2021

Currently libconfig functions take (const char *) arguments for file names and call fopen(...) function inside. This is perfectly right in Linux world where strings are stored in UTF-8, but unfortunately, this way does not support arbitrary non-ASCII characters in filenames on Windows. See http://utf8everywhere.org/ for details.

Could you please add some support for Windows as well. For example, if you accept filenames as std::filesystem::path, this will work perfectly. Or please implement any other method suggested in http://utf8everywhere.org/

@hyperrealm
Copy link
Owner

I don't have access to a Windows system at this time. If someone who does could create a patch to add this, I'd appreciate it.

@nenin-sc
Copy link

nenin-sc commented Dec 15, 2022

It is possible to use windows native wide string functions (_wfopen?) to get FILE handle and then use it in Config methods
void read (FILE * stream) void write (FILE * stream) const
Of course, it might have some portability footprint.

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

No branches or pull requests

3 participants