Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-12895

UTF-16 text is misidentified as utf8

    Details

      Description

      If you upload a .txt file to Resources which is UTF-16LE encoded (e.g. identified as "Unicode" in Windows XP Notepad), when you subsequently download it through the access servlet, it is served with a charset of utf8, which is incorrect, so you get garbled binary in the browser (as utf16 is not ASCII compatible).

      The correct behaviour in this case if the encoding is not known is to omit the encoding in the http response and let the browser auto-detect it.

      This needs to be looked at with some care, however, as it's possible that the utf8 encoding is set to deal with other issues in other content types, so we don't want to break anything else by fixing this.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  smarquard Stephen Marquard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code