Skip to content

Win32FileSystem releated functions should use wchar_t (UTF-16) #7

Closed
@hals1010

Description

@hals1010

File related classes like WindowsFile use ANSI functions like fopen_s. This may lead to problems if the app ever runs on computers that use Asian file names (I had to learn this the hard way).

Please consider using "wide" functions like _wfopen_s for this.

Structs like ShaderCreationAttribs (contains a member const Char* FilePath) may stay as they are, as long as the file name is UTF-8 encoded. You can later convert that to wchar_t by using

MultiByteToWideChar(CP_UTF8, 0, pcUTF8, -1, wUTF16, _countof(wUTF16);

Best Regards,
Jörn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions