Skip to content

CreateFile2 in mmap::open fails with UTF-8 string in Unicode env #1996

@Colysia

Description

@Colysia

#1973
In this PR, the MultiByteToWideChar function is used to convert a std::string to a std::wstring. This works fine when the C++ project is using the default multibyte character set in Windows. However, in cases where we choose to use UTF-8 encoding for the source files and configure the C++ project to use the Unicode character set, this approach might not work as expected. Therefore, I would suggest providing an option to set a callback, allowing developers to implement their own conversion logic from std::string to std::wstring based on their specific encoding environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions