SWORD
  1. SWORD
  2. API-160

Windows clib functions cannot handle non-ASCII Unicode file paths

    Details

    • Type: Bug Bug
    • Status: Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2, 1.7.0
    • Fix Version/s: None
    • 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.

      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 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 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 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 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 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 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.

          People

          • Assignee:
            Unassigned
            Reporter:
            Greg Hellings
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: