<div dir="ltr"><div>A long, long time ago I took over building a MinGW Sword package build for Fedora in order to enable cross-compiling Xiphos for Windows machines.</div><div><br></div><div>In so doing I also adopted a patch against Sword that Xiphos keeps in its tree. This is due to a bug (feature? Let&#39;s just go with &quot;limitation&quot;) in the C APIs on Windows. The bug, if memory serves, is that calling basic file functions in C (fopen, etc) only supports arguments in cp1252/ASCII. So any users who have usernames with non-CP1252 characters are left unable to run Sword without custom pointing to a SWORD_HOME that is outside of their user directory. The solution is to use Windows API calls and pass in data in UTF-16, or whatever encoding is in vogue on Windows these days.<br></div><div><br></div><div>Xiphos&#39; solution was to just substitute out calls to the file functions with calls to the glib wrapped file functions. Glib is mature enough to have worked around this Windows quirk and can take the UTF-8/16 data and call the appropriate methods in the Windows API that are required for such paths (Linux handles non-ASCII characters in the path with fopen and its siblings without any hiccups. It&#39;s not a compiler bug, either - it lives somewhere deep inside of the system library in Windows itself). This solution works great for Xiphos, which already depends on Glib as part of the GTK stack but it results in my Windows editions of the utils being inflated by also carrying the full Glib/pango/etc stack just to work around this one small (but major) issue.<br></div><div><br></div><div>The patch against 1.8.1 released code lives here: <a href="https://src.fedoraproject.org/rpms/mingw-sword/blob/master/f/xiphos_sword.patch">https://src.fedoraproject.org/rpms/mingw-sword/blob/master/f/xiphos_sword.patch</a></div><div><br></div><div>Is there any chance we can get a mainline Sword solution to this bug so that Bible Time, The SWORD Project for Windows, and any others are not impacted by this going forward? With the talk about 1.9 going on, I figured this would be a good time to poke this bear. Also, it might be that Windows fixed this in Windows 10, but it was still in Windows 8.1 the last time I checked, and it dates back to the early days of Win32 APIs, so I doubt that.</div><div><br></div><div>--Greg<br></div></div>