Ovo će web mjesto raditi na ograničen način, dok obavljamo održavanje stranice. Ako neki članak ne riješi tvoj problem i ako želiš postaviti pitanje, naša zajednica za podršku spremna je pomoći na Twitteru @FirefoxSupport i na Redditu /r/firefox.

Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

Why does Firefox select a latin encoding for local UTF8 encoded XHTML-files

  • 2 odgovora
  • 12 ima ovaj problem
  • 7 prikaza
  • Posljednji odgovor od drickes

more options

Firefox displays local XHTML files always first in latin encoding, even though - default encoding (config option intl.charset.default) is UTF-8 - the file starts with the header '' - no other encoding is mentioned in the file or in the referred CSS style sheet - the current locale is de_DE.UTF-8.

I am able to change the encoding via the menu, but I have to repeat this each time I open a file.

The files in questions are all simple XHTML files with no script elements and are opened with Ctrl-O.

Firefox displays local XHTML files always first in latin encoding, even though - default encoding (config option intl.charset.default) is UTF-8 - the file starts with the header '<?xml version="1.0" encoding="utf-8"?>' - no other encoding is mentioned in the file or in the referred CSS style sheet - the current locale is de_DE.UTF-8. I am able to change the encoding via the menu, but I have to repeat this each time I open a file. The files in questions are all simple XHTML files with no script elements and are opened with Ctrl-O.

Svi odgovori (2)

more options

You may have to save the file with the proper BOM code for UTF-8 to make this work.

more options

Yes and No.

If I use a BOM Firefox recognizes the encoding, but displays the BOM at the top of the page! So there seems to be no way to get a standard conforming file to be displayed correctly.

It is really sick to base the recognition of UTF-8 on a BOM. According to the Unicode standard in UTF-8 a BOM is allowed but not necessary and discouraged. On the official web page http://unicode.org/faq/utf_bom.html they write "Where the precise type of the data stream is known... the BOM should not be used." And here we have XHTML which by default is, like any XML, encoded in UTF-8, and which explicitly is declared to be UTF-8 on a system whose locale is UTF-8 and where Firefox has been told to use UTF-8 in case of doubt -- and Firefox displays the file as Latin-1! ( Probably I should be happy that it didn't choose some Chinese encoding )-: , which is as reasonable as choosing Latin-1 as soon as you have gotten the western blinkers off.)