Uploaded image for project: 'SWORD'
  1. SWORD
  2. API-160

Windows clib functions cannot handle non-ASCII Unicode file paths

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2, 1.7.0
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      If a user stores SWORD-related files under a path including non-ASCII characters in Windows, the library will be unable to access them.

      The library currently uses the standard C library calls to methods such as open, mkdir, fopen, etc. On most modern systems these calls are able to handle Unicode paths fine but on Windows these are limited to ASCII(or possibly current 8-bit system encoding?)-only.

      We should update the library to use wrapper functions around the required functionality for building on Windows. Xiphos is using a patched version of the library that uses compatible calls to GLib functions. I am attaching their patch for reference.

        Attachments

        1. 05-util-open.patch
          28 kB
          Greg Hellings
        2. util_file_ops.patch
          19 kB
          Greg Hellings
        3. xiphos_sword.patch
          24 kB
          Greg Hellings

          Activity

          Hide
          greg.hellings Greg Hellings added a comment -

          I have begun the process of porting the GLib functions over to SWORD code. The first few have been written but not tested. The remaining ones in swopen.h's comment need to be implemented and then used in the locations identified in the attached Xiphos patch.

          Show
          greg.hellings Greg Hellings added a comment - I have begun the process of porting the GLib functions over to SWORD code. The first few have been written but not tested. The remaining ones in swopen.h's comment need to be implemented and then used in the locations identified in the attached Xiphos patch.
          Hide
          greg.hellings Greg Hellings added a comment -

          Patch for the first few wrapper methods. Still to do:

          Directory navigation methods/structs
          ENV access methods
          Test on Windows

          Show
          greg.hellings Greg Hellings added a comment - Patch for the first few wrapper methods. Still to do: Directory navigation methods/structs ENV access methods Test on Windows
          Hide
          greg.hellings Greg Hellings added a comment -

          I have updated the patch to cover all the functionality that is covered by the Xiphos patch.

          Presently, the resulting builds seem to work fine in Linux but cause Windows to crash. In particular, there is a problem with the UTF-8/UTF-16 and reverse functions.

          Show
          greg.hellings Greg Hellings added a comment - I have updated the patch to cover all the functionality that is covered by the Xiphos patch. Presently, the resulting builds seem to work fine in Linux but cause Windows to crash. In particular, there is a problem with the UTF-8/UTF-16 and reverse functions.
          Hide
          gwangjin Gwang-Jin Lee added a comment -

          Hello,

          I hope the issue will be solved. The issue is likely to related with [a BibleTime issue|https://github.com/bibletime/bibletime/issues/117.] Thank you.

          Show
          gwangjin Gwang-Jin Lee added a comment - Hello, I hope the issue will be solved. The issue is likely to related with [a BibleTime issue| https://github.com/bibletime/bibletime/issues/117 .] Thank you.
          Hide
          scribe Troy A Griffitts added a comment -

          This has been fixed in SWORD 1.9.0.

          Show
          scribe Troy A Griffitts added a comment - This has been fixed in SWORD 1.9.0.
          Hide
          scribe Troy A Griffitts added a comment -

          Thanks for all the patches and isolation of the problem points. I believe we have this resolved in SWORD 1.9.0.

          If anyone still notices problems, please reopen or creat a new ticket with bugs against the implemented solution.

          Show
          scribe Troy A Griffitts added a comment - Thanks for all the patches and isolation of the problem points. I believe we have this resolved in SWORD 1.9.0. If anyone still notices problems, please reopen or creat a new ticket with bugs against the implemented solution.
          Hide
          scribe Troy A Griffitts added a comment -

          Initial commit:

          https://github.com/bibletime/crosswire-sword-mirror/commit/b3171d11efb73274ad4f39fa599ed4a14863ec54

           

          Plus many improvements following that commit leading up to 1.9.0 release.

          Show
          scribe Troy A Griffitts added a comment - Initial commit: https://github.com/bibletime/crosswire-sword-mirror/commit/b3171d11efb73274ad4f39fa599ed4a14863ec54   Plus many improvements following that commit leading up to 1.9.0 release.

            People

            • Assignee:
              scribe Troy A Griffitts
              Reporter:
              greg.hellings Greg Hellings
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: