4

How do I set the default encoding in Firefox/Iceweasel to Unicode (instead of Western)?

I'm particularly interested in the default encoding for *.txt files. Firefox/Iceweasel seems to always choose Western as the encoding for such files. I know that I can change the encoding for a particular page through View > Character Encoding, but it gets tiresome after a while.

kjo
  • 1,201
  • 4
  • 20
  • 39
  • Are you using a localized version of Firefox/Iceweasel, rather than 'English (US)'? – user3169 Apr 07 '16 at 06:04
  • @user3169: I don't recall performing any special configuration to that effect. How could I find out the answer to your question? – kjo Apr 07 '16 at 07:35
  • 1
    I can't say for iceweasel, since I don't know how it is distributed, but for Firefox the installation software has localized versions, as shown on this page: [Download Firefox in your language](https://www.mozilla.org/en-US/firefox/all/). Your default might depend on you locale or OS. If you don't know the locale for your installation, enter "about:healthreport" in the URL bar, click on "Raw Data", then click on one of the items on the right. Then search for locale and you will see a line like **"locale": "en-US"**. – user3169 Apr 07 '16 at 17:08
  • See my answer to this question (which is a possible duplicate of yours): https://superuser.com/questions/1215064/change-firefox-default-encoding-for-text-files/1247739#1247739 – Brōtsyorfuzthrāx Sep 06 '17 at 02:17

2 Answers2

0

In about:config, set intl.charset.fallback.utf8_for_file to true.

However, this only works for local files (file:/// URLs).

(shamelessly copied from this answer)

mivk
  • 3,441
  • 36
  • 33
0

You cannot configure this. If the encoding was a function of user-side configuration, people would create content dependent on their own settings, and then the content would not show up correctly for other readers.

For file: URLs, Firefox autodetects UTF-8 these days. (The older answer was correct when it was posted, though.)

hsivonen
  • 152
  • 6