Skip to content

Incorrect api used for sys_read_dir on windows #315

Description

@tobil4sk

On windows, neko uses FindFirstFileA for sys_read_dir. This returns ANSI encoded strings (not to be confused with ASCII) which means that any non-ascii characters are not compatible with utf8, so they can cause issues when the strings from this function are passed to other places.

We should instead use the FindFirstFileW variant which gives utf-16 encoded strings, which can then be converted to valid utf-8.

Similarly, we should replace any use of ANSI variants of the windows api.

This way the behaviour will match non-windows platforms and be more compatible.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions