Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-58

Unescape handling needs rethinking

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Patch Needed, 1.x
    • Component/s: Parser
    • Labels:
      None

      Description

      The current escape parsing converts <esc><char> to plain <char> if the <char> is not one of the special characters to be escaped.

      This can affect unicode escapes if the <esc> character is backslash.

      One way round this is to specifically check for <char> == 'u', but it seems wrong to only do this for 'u'.

      Another solution would be to leave <esc><char> as is unless the <char> is one of the special characters.

      There are several possible ways to treat unrecognised escapes:

      • treat it as if the escape char had not been present (current behaviour)
      • leave the escape char as is
      • throw an exception

        Attachments

        1. commons-csv.diff
          35 kB
          Anirudha Khanna

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sebb Sebb
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: