GNOME Bugzilla – Bug 737089
Guile on Windows can't access files in paths containing diacritical characters
Last modified: 2018-06-29 23:33:54 UTC
On Windows any attempt to access a file path that has diacritical characters (or "wide characters") via any function provided by guile 1.8 (in scheme or in c) will fail. This mostly affects our attempts to read or write files in the .gnucash dir in the user's home directory if the user name has any diacritical characters, like for example C:\Users\Łukasz\.gnucash This bug is actually a follow up of bug 711567 which specifically talked about saving personalized reports. That particular instance will have a fix in gnucash 2.6.4. There are other parts of gnucash however that still attempt to access the .gnucash directory via guile calls. In particular: - src/import-export/qif-imp/qif-guess-map.scm reads and writes a file named "qif-accounts-map" in the .gnucash directory - src/report/report-system/eguile-utilities.scm reads files relative to the .gnucash directory - src/report/report/system/html-style-sheet.scm reads and writes a file named "stylesheets-2.0" in the .gnucash directory The guile irc channel suggested that maybe guile 2 no longer has this problem so switching to guile 2 could be the best solution. I have just (as in September 2014) attempted to build guile 2.0.11 for Windows and failed. Conversations [1] on the mingw-user mailinglist suggested that there are still several important bugs in guile 2 that prevent it from working correctly on Windows. A patched binary of guile 2 on Windows is available though on [2]. So the solution for this particular bug can come in either of two forms: 1. evaluate whether guile 2 indeed no longer suffers from this issue and then do what is necessary to build gnucash on Windows with guile 2 (either by using the available pre-built binary or figuring out which patches are required to get it to work and build from source ourselves). 2. If guile 2 still suffers from the same issue, rewrite the gnucash code to no longer use any guile functions to access files in the user's home directory. This is the work around used to fix bug 711567 so examples on how to accomplish that can be found in our current code. [1] http://sourceforge.net/p/mingw/mailman/message/32809708/ [2] http://sourceforge.net/projects/ezwinports/files/guile-2.0.11-2-w32-bin.zip/download
I have managed to build gnucash with guile 2 from ezwinports. Unfortunately guile 2 still can't handle paths with diacritical characters in it. Maybe it can with the right tweaks but that hasn't been investigated yet.
It may not be Guile so much as how the path is getting read. A lot of MS's environment commands come in two flavors, wide and narrow. The wide reads UTF16, the narrow reads 8 bits and assumes encoding to the current code page. Narrow is virtually impossible to use correctly except in English. Example functions are GetEnvironmentVariable()/GetEnvironmentVariableW() and GetCurrentDirectory()/GetCurrentDirectoryW(). The ones suffixed with 'W' are the wide ones.
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=737089. Please continue processing the bug there and please update any external references or bookmarks.