Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2481

Export portfolio problems with UTF8 characters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.3
    • Fix Version/s: 2.4, 2.3.5
    • Component/s: General
    • Labels:
      None

      Description

      Spyros Papadakis has reported that activity's name in export portfolio with UTF8 characters get displayed as rubbish. See his posting in LAMS Community. Also, have a look at the attached file:

      http://is.gd/5K6mV

        Activity

        Hide
        jundirl Jun-Dir Liew added a comment -
        There are 2 problems here, 1. export portfolio files not displaying utf8 correctly, and 2. export portfolio utf8 filename not being presented by IE correctly.

        1. is fixed due to image rewriter method not reading/encoding file in utf8 when it rewrites image links;

        2. is not a LAMS problem due to browser support of character encodings in the content-disposition header. This page http://greenbytes.de/tech/tc2231/ has a good roundup of browser behaviour in this regard. Note that IE and Safari usually don't try to convert to utf8 and neither support RFC2231 (specifying encoding in header).
        Show
        jundirl Jun-Dir Liew added a comment - There are 2 problems here, 1. export portfolio files not displaying utf8 correctly, and 2. export portfolio utf8 filename not being presented by IE correctly. 1. is fixed due to image rewriter method not reading/encoding file in utf8 when it rewrites image links; 2. is not a LAMS problem due to browser support of character encodings in the content-disposition header. This page http://greenbytes.de/tech/tc2231/ has a good roundup of browser behaviour in this regard. Note that IE and Safari usually don't try to convert to utf8 and neither support RFC2231 (specifying encoding in header).
        Hide
        ernieg Ernie Ghiglione added a comment -
        still having issues with IE.
        Show
        ernieg Ernie Ghiglione added a comment - still having issues with IE.
        Hide
        ernieg Ernie Ghiglione added a comment -
        MOving to 2.3.5 for now.
        Show
        ernieg Ernie Ghiglione added a comment - MOving to 2.3.5 for now.
        Hide
        dronych Andrey Balan added a comment -
        fixed

        however it will need some testing on platforms other than Windows
        Show
        dronych Andrey Balan added a comment - fixed however it will need some testing on platforms other than Windows
        Hide
        ernieg Ernie Ghiglione added a comment -
        This isn't working I thought this could be a unix or windows thing, but it doesn't work on neither.

        One of the things i would suggest is to look at how the export sequence in author handles utf-8 file names as it seems to work there.
        Show
        ernieg Ernie Ghiglione added a comment - This isn't working I thought this could be a unix or windows thing, but it doesn't work on neither. One of the things i would suggest is to look at how the export sequence in author handles utf-8 file names as it seems to work there.
        Hide
        dronych Andrey Balan added a comment -
        in order to fix this for Unix based servers
        change the following line in ExportDownloadServlet.java
        {code}
        zipFilename = new String(zipFilename.getBytes(("ISO-8859-1")), "UTF-8");
        {code}
        to
        {code}
        zipFilename = URLDecoder.decode(zipFilename, "UTF-8");
        {code}
        Show
        dronych Andrey Balan added a comment - in order to fix this for Unix based servers change the following line in ExportDownloadServlet.java {code} zipFilename = new String(zipFilename.getBytes(("ISO-8859-1")), "UTF-8"); {code} to {code} zipFilename = URLDecoder.decode(zipFilename, "UTF-8"); {code}
        Hide
        ernieg Ernie Ghiglione added a comment -
        Done
        Show
        ernieg Ernie Ghiglione added a comment - Done

          People

          • Assignee:
            ernieg Ernie Ghiglione
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development