Skip to content

chd_open and chd_read_header don't work with unicode paths on Windows #55

@TellowKrinkle

Description

@TellowKrinkle

Paths that aren't representable with the user's current codepage are unable to be accessed. There needs to be a way to open a chd that eventually calls _wfopen instead of fopen.

Possible solutions:

  • New versions of chd_open and chd_read_header are added that take a FILE*, allowing users to open their own files with the appropriate call. chd_open_file is almost this for chd_open, but it's impossible to set (*chd)->owns_file from outside of the library, complicating closing of files.
  • New versions of chd_open and chd_read_header are added that take a wchar_t* and call _wfopen on windows
  • chd_open and chd_read_header always treat input as utf-8, and internally convert to utf-16 before calling _wfopen on Windows

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