Encoding issue with text files opened in the browser from the website

Bug #1012835 reported by Péter Trombitás
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Incomplete
Undecided
Unassigned

Bug Description

I'm not sure which package is affacted, but this seems to be the most likely.
Example:
 - click on this link:
    http://ubuntuone.com/0qqPzEOwWtjb6BkiNtnXhF
    - it is clear that the encoding is wrong
 - save the file to your computer and open it with your favourite editor (i. e. gedit)
    - all characters are displayed correctly

Tags: encoding web+
visibility: private → public
Rick McBride (rmcbride)
Changed in ubuntuone-servers:
assignee: nobody → Ubuntu One web team (ubuntuone-web)
status: New → Confirmed
Revision history for this message
Leo Arias (elopio) wrote :

Hey Péter,

Thanks for your report.

I see the same thing on the browser (Firefox 13) and on gedit. I can see no encoding errors. Can you please tell us what you are seeing? a screenshot would be good. Also, what browser are you using?

pura vida,
Leo.

tags: added: encoding web+
Changed in ubuntuone-servers:
status: Confirmed → Incomplete
Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

The file in question uses UTF-8 encoding. Whether this is displayed correctly or not in Firefox is dependent on the default encoding set in preferences, since UbuntuOne fails to declare charset in the Content-Type HTTP header:

$ curl -I http://ubuntuone.com/0qqPzEOwWtjb6BkiNtnXhF 2>/dev/null|grep Content
Content-Length: 1293
Content-Disposition: inline; filename="Erre_j?rtunk.txt"; filename*=UTF-8''Erre_j%C3%A1rtunk.txt
Content-Type: text/plain
                                           ^^^^^^^

Should have been:
Content-Type: text/plain; charset=utf-8

.. to better ensure that the text is decoded correctly by all clients.

So the browser (Firefox 14.0.1 on Ubuntu 12.04 in my case) selects its default encoding, and when that is ISO-8859-1 (the default choice), the text is garbled.

UbuntuOne should allow user to override ContentType and/or specify charset for published files. I know UbuntuOne allows to change the Content-Disposition-header through the "?attachment=true" query param, so perhaps it should allow override of the Content-Type header as well, if the user so desires.

Curtis Hovey (sinzui)
Changed in ubuntuone-servers:
assignee: Registry Administrators (registry) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.