The issue arises because MSYS2 uses a patched version of glib's stdio.c (see [1]) that obviously chokes on the duplicated 'b' modifier. (For the background of this patch see [2]).
As the duplication of 'b' certainly does not seem to be standard conforming (see [3,4]) that code should be fixed and we're certainly lucky Microsoft's implementation of fopen() was lenient enough not to fail before.
A general thing I noticed: Why do we use separate code paths in fopen_utf8name() to start with? Calling g_filename_from_utf8() followed by g_open() should work across all OSs.
The issue arises because MSYS2 uses a patched version of glib's stdio.c (see [1]) that obviously chokes on the duplicated 'b' modifier. (For the background of this patch see [2]).
As the duplication of 'b' certainly does not seem to be standard conforming (see [3,4]) that code should be fixed and we're certainly lucky Microsoft's implementation of fopen() was lenient enough not to fail before.
A general thing I noticed: Why do we use separate code paths in fopen_utf8name() to start with? Calling g_filename_ from_utf8( ) followed by g_open() should work across all OSs.
[1] https:/ /github. com/Alexpux/ MINGW-packages/ blob/master/ mingw-w64- glib2/0001- Use-CreateFile- on-Win32- to-make- sure-g_ unlink- always. patch /bugzilla. gnome.org/ show_bug. cgi?id= 674214 pubs.opengroup. org/onlinepubs/ 009695399/ functions/ fopen.html /msdn.microsoft .com/library/ yeby3zcb. aspx
[2] https:/
[3] http://
[4] https:/