When using FileDecoder and FileEncoder objects (or the almost-low-level APIs StreamDecoder and StreamEncoder with a initWithFile/initWithOggFile methods) on Windows, uses fopen to open the files. But fopen on Windows does not understand non-ascii characters in the path.
The PR uses custom open mechanism for the low level API, in which in Windows converts the UTF-8 string into UTF-16 to use _wfopen_s to open the file (the Wide String version of fopen_s) which supports paths with Unicode characters.
This PR does not fix for other APIs like in Metadata due to limitations in the FLAC C API.
Coverage increased (+2.7%) to 91.389% when pulling e9af6a48185dac4741c5437b06d982020d36c8e6 on fix/37-unicode-paths-on-windows into 8d2b913150193f6c04e357cfdc313dde3a1bad33 on master.
When using
FileDecoder
andFileEncoder
objects (or the almost-low-level APIsStreamDecoder
andStreamEncoder
with ainitWithFile
/initWithOggFile
methods) on Windows, usesfopen
to open the files. Butfopen
on Windows does not understand non-ascii characters in the path.The PR uses custom open mechanism for the low level API, in which in Windows converts the UTF-8 string into UTF-16 to use
_wfopen_s
to open the file (the Wide String version offopen_s
) which supports paths with Unicode characters.This PR does not fix for other APIs like in Metadata due to limitations in the FLAC C API.
Fixes #37