Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8688

Auto-detect file charset based on XML header

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scanner
    • Labels:

      Description

      Similar to what we did for files with BOM, we could detect encoding of XML files.

      We could do a simple detection using the "encoding" attribute when it is present. In addition we could try to implement a more advanced detection when the attribute is missing. See:
      https://www.w3.org/TR/xml/#sec-guessing

      Be careful to handle crappy cases where BOM and XML header don't match.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            julien.henry Julien Henry
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: