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

Allow UTF-8 encoded files to contain NULL if source encoding is UTF 8

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scanner
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      We assume that a file is not encoded with UTF-8 if it contains null bytes, even if `sonar.sourceEncoding` is set to UTF-8.
      We should give more importance to `sonar.sourceEncoding` (even though it can only be set for the entire project and not for specific files) and run the enconding detecting algorithm without rejecting UTF-8 if there are nulls in the file.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              duarte.meneses Duarte Meneses
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: