myGrid
  1. myGrid
  2. TAV-273

XML loading and saving not UTF-8 aware

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.4, 1.5
    • Fix Version/s: 2.0 essential
    • Component/s: None
    • Labels:
      None

      Description

      Most of our datas, such as the Scufl workflow and the Baclava document, are stored as XML. By default, XML uses utf-8 as encoding.

      However, most of our current code uses tricks like FileReader and FileWriter to write and read that XML. That means that unicode characters are not stored and read correctly, because, File*er uses whatever is the default encoding on the particular platform.

      We should save and load as UTF-8 all over.

      The impact factor is not very big, except that for say saving workflows for authors with non-English names, such as my own (Stian Søiland). The changes required are not very big either.

      Example:

      code
      InputStreamReader isr = new InputStreamReader(is, Charset.forName("UTF-8"));
      code

        Activity

        Hide
        Stian Soiland-Reyes added a comment -

        Fixed for Workflow load/save, and for input document loading. Should also do this properly for output document saving ("Save as XML"), result document, etc. and in general everywhere some XML is loaded or saved.

        For inputs loaded from file I think it's OK to use the system encoding by now, unless that is an XML input document..

        Show
        Stian Soiland-Reyes added a comment - Fixed for Workflow load/save, and for input document loading. Should also do this properly for output document saving ("Save as XML"), result document, etc. and in general everywhere some XML is loaded or saved. For inputs loaded from file I think it's OK to use the system encoding by now, unless that is an XML input document..
        Hide
        Ian Dunlop added a comment -

        This should be covered by the T2 data manager/blob store

        Show
        Ian Dunlop added a comment - This should be covered by the T2 data manager/blob store
        Hide
        Stian Soiland-Reyes added a comment -

        Worth to have as a note to check the t2 serialisation of workflows though

        Show
        Stian Soiland-Reyes added a comment - Worth to have as a note to check the t2 serialisation of workflows though

          People

          • Assignee:
            Ian Dunlop
            Reporter:
            Stian Soiland-Reyes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: