Closed Bug 1675616 Opened 4 years ago Closed 3 years ago

Firefox ignores xml encoding hints in html

Categories

(Core :: Networking: HTTP, defect)

78 Branch
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: eular.frank, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I upload to a web server an html starting with
<?xml version="1.0" encoding="UTF-8"?>
and then I visit the html in Firefox

Actual results:

Firefox ignores that UTF-8 hint, and render the html as Western.

Expected results:

It should be rendered with UTF-8 encoding.

This does not happen when I use Firefox to load my html locally. I can reproduce this problem both on my laptop and on Android, which indicates that this is possibly a problem about gecko engine.

This does not happen in other browsers like Chromium.

What mime type is your web server using?

For html (text/html) you should use a meta tag i.e. <meta charset="UTF-8">

Type: text/html
Render mode: Standards compliance mode
Text Encoding: windows-1252

Fetched from Rex Swain's HTTP Viewer:

HTTP/1.1 200 OK
Connection: close
Date: ...
Accept-Ranges: bytes
ETag: "6e3c-5b175c3ffd7f1"
Server: Apache/2.4.38 (Debian)
Vary: Accept-Encoding
Content-Length: ...
Content-Type: text/html
Last-Modified: ...

Hi,

I'll add a product and component to this ticket so the corresponding team can take a look and advice.

In the mean time, can you check this issue on the latest Firefox Nightly version and check if the issue is reproducible there as well? You can download it from here: https://nightly.mozilla.org/

Thanks in advance,
Virginia

Component: Untriaged → Networking: HTTP
Flags: needinfo?(eular.frank)
Product: Firefox → Core

It is fixed in today's nightly.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(eular.frank)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.