Comment 2 for bug 1012835

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.