Launchpad should return header Content-Type: text/plain;charset=UTF-8

Bug #1899237 reported by Tiago Stürmer Daitx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned

Bug Description

Text files nowadays are quite likely in UTF-8 and Launchpad should default to it when setting text/plain for the "Content-Type" header - it should be set to "text/plain;charset=UTF-8"

I usually see the browser using the wrong charset for various text/plain files: changelogs, changes, diffs, attachments, etc.

For example, the 2 following .changes and a .diff files

- https://launchpadlibrarian.net/501144131/openjfx_11.0.7+0-2ubuntu2_source.changes

- https://launchpadlibrarian.net/465885965/openjdk-lts_11.0.6+10-2ubuntu1_11.0.6+10-2ubuntu2.diff.gz

are rendered incorrectly in Firefox because it defaults to 'Western'.

Using "Firefox Hamburger Menu -> More -> Text Encoding -> Unicode" fixes that and the text is rendered in the correct encoding.

Chromium is not affected and defaults to Unicode due to its own charset detection logic.

I believe that defaulting to the UTF-8 charset is more reasonable nowadays than defaulting to the Western (ie. iso-8859-1) charset.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

This would also fix bug 1059752 for which - at the time - would made not much sense to default to UTF-8 just yet.

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.