JIRA is not showing .txt content properly even with same encoding

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: 8.20.1, 8.22.2, 9.3.0, 9.12.19
    • Component/s: Issue - Attachments
    • 8.2
    • 12
    • Severity 2 - Major
    • 1

      Jira is not able to provide the right encoding for .txt files even though the .txt file has the same encoding character set as the Jira instance:

      Way to reproduce

      • Install Jira. Currently tested on 8.20.1, 8.22.2, 9.3.0
      • Ensure you have setup UTF-8 across DB, Application server and Web application as mentioned here: Troubleshoot character display issues in Jira server
      • Create a .txt file with the following content:
        Ügyfél kérésének tesztelése:
        Ez egy példa olyan tartalomra, amely speciális karaktereket tartalmaz.
        
      • Ensure that the file is UTF-8 as your Jira instance encoding charset
        $ file special_chars.txt 
        special_chars.txt: Unicode text, UTF-8 text
        
      • Attach your new file to an Issue
      • Click on the new attachment to open it in the web browser

      Expected behavior

      Current behavior

      The problem is probably associated with HTTP headers. Some information may have been omitted, making it impossible for the browser to determine what encoding was used. The console log from Firefox seems to confirm that.

      The character encoding of the document was not declared, so the encoding was guessed from content. The character encoding needs to be declared in the Content-Type HTTP header or using a byte order mark.
      

      Workaround

      As a workaround, we suggest some plugins that would force the browser to display files in the selected encoding. For example:

        1. current-behavior.png
          current-behavior.png
          190 kB
        2. expected-behavior.png
          expected-behavior.png
          145 kB

            Assignee:
            Unassigned
            Reporter:
            Jose Antonio Uribe (Inactive)
            Votes:
            14 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: