On Wed, Aug 26, 2020 at 4:38 PM Liu Hao <lh_mo...@126.com> wrote: > > 在 2020/8/26 18:05, Vincent Torri 写道: > > > > the file is : Moș_Crăciun_cântece.txt > > I print it in the prog with printf : > > > > $ ./fopen.exe Moș_Crăciun_cântece.txt > > bad > > Mo?_Craciun_cÔntece.txt > > > > Would you please check whether the program behaves as expected in CMD? > > MSYS2 performs some path translations, but I am not clear whether it has > anything to do with the encoding. I suspect it has, > because Linux programs generally expects UTF-8, so there must be kind of > conversion from UTF-8 to ACP for arguments passed > to native programs.
i've checked in cmd too, same result But there is anyway something strange to me : myprog_gcc.exe and myprog_vs are *both* run in MSYS2, and the result is different. So I don't think it's related to path translation. It would suggest something related to how gcc builds the binary Vincent Torri _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public