Closed Bug 1551400 Opened 5 years ago Closed 5 years ago

since firefox 28, its not possible to set Text Encoding for Legacy Content to utf-8 in preferences-content-advance

Categories

(Firefox :: Settings UI, defect)

28 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1034960

People

(Reporter: nasrinkhaksar3, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0

Steps to reproduce:

if i open one persian text or even html content (which uses utf-8), firefox shows GIBBERISH for me instead of my actual content. everytime i should use view menu and select encoding utf-8. but unfortunately this solution is temporary and appears again as soon as i close and reopen my files again, or even when i refresh the file with f5 key!

Actual results:

GIBBERISH characters for farsi documents which always work only in utf-8 and need to select correct encoding in view menu text encoding forever even when the files is refreshed.

Expected results:

a solution that i can set Fallback Text Encoding: utf-8 forever in content or even in about:config that i can open legacy persian files without any issues in firefox!

Attachment 9064661 [details] looks okay to me. At least it's not mojibake, if that's what you mean by "gibberish". The W3C validator says the site it was saved from is UTF-8, so the missing encoding setting wouldn't have any effect anyway.

If there's an actual page with no encoding information that isn't recognized correctly, then that might be a bug to fix in Firefox. But if the site is in fact sending the wrong encoding information, that's a bug for the site to fix. If they won't, you can modify the Content-Type response header with an add-on like Header Editor.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Component: Untriaged → Preferences
Resolution: --- → DUPLICATE

(In reply to Gingerbread Man from comment #1)

Attachment 9064661 [details] looks okay to me. At least it's not mojibake, if that's what you mean by "gibberish". The W3C validator says the site it was saved from is UTF-8, so the missing encoding setting wouldn't have any effect anyway.

If there's an actual page with no encoding information that isn't recognized correctly, then that might be a bug to fix in Firefox. But if the site is in fact sending the wrong encoding information, that's a bug for the site to fix. If they won't, you can modify the Content-Type response header with an add-on like Header Editor.

*** This bug has been marked as a duplicate of bug 1034960 ***

i mean that i had numerous files in my laptop in persian,both text and html format. since firefox 28 and later, i cant set Fallback Text Encoding: to utf-8, firefox does not understand the correct encoding and for example: shows the content in chinese, cyrillic or other encodings!
i should every time use view menu, text encoding and select utf-8 that firefox can displays my files correctly!
i dont want to use firefox 27 forever, because most of newer versions have many important features and bug fixes for me!
but going to view menu and select encoding utf8 is very difficult, because i should repeate it every time that i want to open such files!
the encoding is not defined in my files, (especially if i open text files), but i need a solution that i can set Fallback Text Encoding: utf-8 forever!
i dont know in which operating system you tested my attached file, but firefox never recognizes the correct encoding for me in this file and other similar files that encoding information is not defined in the file.

from this bug
https://bugzilla.mozilla.org/show_bug.cgi?id=910192
it seams that many people with different languages benefited except persian users!
in firefox 27 and previous versions, i did not have any issues with any files, both my local files and the pages on the web.
so, why should i go to view menu to select utf8 every times that i open files when i did not have any issues previously?
i tested with internet explorer 8 and the encoding which it displayed was incorrect, but it was not the encoding which firefox showed.
i think internet explorer displayed arabic and some unknown character language for me.
i wish to set utf8 forever as i could do in firefox 27.

(In reply to zahra from comment #0)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0

You are using a really old version of Firefox. Please check the latest version before reporting bugs.

Unfortunately, the latest version is not available for Windows XP, and we don't provide fixes for Windows XP anymore. If you wish to get bug fixes for Firefox, you need a newer operating system (Windows or Linux).

a solution that i can set Fallback Text Encoding: utf-8 forever in content or even in about:config that i can open legacy persian files without any issues in firefox!

This file works fine if you open it in Firefox 66 or later from a file: URL. If you serve it on the Web, you should label it as UTF-8 (either by adding <meta charset=utf-8> in the file or the charset parameter in the Content-Type HTTP header.)

(In reply to Henri Sivonen (:hsivonen) from comment #4)

(In reply to zahra from comment #0)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0

You are using a really old version of Firefox. Please check the latest version before reporting bugs.

Unfortunately, the latest version is not available for Windows XP, and we don't provide fixes for Windows XP anymore. If you wish to get bug fixes for Firefox, you need a newer operating system (Windows or Linux).

a solution that i can set Fallback Text Encoding: utf-8 forever in content or even in about:config that i can open legacy persian files without any issues in firefox!

This file works fine if you open it in Firefox 66 or later from a file: URL. If you serve it on the Web, you should label it as UTF-8 (either by adding <meta charset=utf-8> in the file or the charset parameter in the Content-Type HTTP header.)

unfortunately i am not technical in html and dont know how to add charset utf8 to my files!

it worked correctly in firefox 27 and i wish that enable it in any version of firefox that i wish to use!
why did you remove such useful feature that i really need for persian content that made thasks very difficult for me?

i believe that its the choice for any user that can select favorite version of firefox and use it forever.

i really dont like and dont need newer firefox, but i wish to open my files without any issues!

i searched in the internet and found a solution for this problem, but unfortunately it does not work for me!

adding
intl.charset.fallback.utf8_for_file
in about:config to true.
i did it and still does not work for me.
how can i fource firefox that always use utf8 for Fallback Text Encoding?

now, i downloaded chrome 49 and tested my file.
i believe both chrome and firefox use Fallback Text Encoding: Other (incl. Western European) instead of utf8.
since i only love firefox not other browser, i wish a permanent solution for this issue.

(In reply to zahra from comment #5)

unfortunately i am not technical in html and dont know how to add charset utf8 to my files!

So you're opening local HTML files you have saved on your computer? If so, first create backup copies of the files, just in case. Then open them in a text editor and add <meta charset="utf-8"> in a new line directly below <head>

If you have many files, you can use an advanced text editor like Notepad++ to edit them all at the same time. In its Search menu you can find the Replace… menu item, and under the File menu, you can find the Save All menu item.

(In reply to Gingerbread Man from comment #8)

(In reply to zahra from comment #5)

unfortunately i am not technical in html and dont know how to add charset utf8 to my files!

So you're opening local HTML files you have saved on your computer? If so, first create backup copies of the files, just in case. Then open them in a text editor and add <meta charset="utf-8"> in a new line directly below <head>

If you have many files, you can use an advanced text editor like Notepad++ to edit them all at the same time. In its Search menu you can find the Replace… menu item, and under the File menu, you can find the Save All menu item.

So you're opening local HTML files you have saved on your computer?

exactly, both html and text files i have on my computer.

i tried with the file which i attached hear and it now is displayed correctly.
really i appreciate your help, God bless you!

but what should i do with text files? texts have no html code that i can find head and defind utf8 just below head!

i am wondering why

adding
intl.charset.fallback.utf8_for_file
in about:config
did not work for me.
do i need to do extra taskthat this preference work correctly?

i tested again with google chrome and enabled auto detect and it worked correctly.
but in firefox, i even i could not activate Autocorrect.

(In reply to zahra from comment #9)

i tried with the file which i attached hear and it now is displayed correctly.
really i appreciate your help, God bless you!

You're welcome.

but what should i do with text files?

I tested Firefox 52.9.0 ESR, which is the last version that works on Windows XP. I pasted some text from Farsi Wikipedia and saved it as a UTF-8 file in Windows Notepad. It displayed correctly.
If you open the text file in Notepad++ it should say "UTF-8-BOM" in the status bar at the bottom of the window. If it doesn't,

  1. Create a new blank file in Notepad++.
  2. From the Encoding menu, choose Convert to UTF-8-BOM.
  3. Paste the text from the original file.
  4. Save as a new file and double-check that it displays correctly in Firefox.

intl.charset.fallback.utf8_for_file
in about:config
did not work for me.

That preference was added in Firefox 59 and removed in Firefox 66 (bug 1071816). I tested a local plain text file that was UTF-8 without BOM (Byte Order Mark) and it displayed correctly, so it's no longer needed.

why did you remove such useful feature

Because of the effects it would have on the Web if creators of Web content used the configuration you wish to use and ended up relying on it.

i believe that its the choice for any user that can select favorite version of firefox and use it forever.

Then you are stuck with the behavior of that version.

This is a bug database and not a support forum. The purpose of Bugzilla isn't to provide assistance in configuring past versions of Firefox but to track changes to future versions of Firefox, and future versions can't help you if you can't/won't use them.

(In reply to Henri Sivonen (:hsivonen) from comment #12)

This is a bug database and not a support forum.

Note that if you need help in the future, you can ask a new question on support.mozilla.org.

(In reply to Gingerbread Man from comment #13)

(In reply to Henri Sivonen (:hsivonen) from comment #12)

This is a bug database and not a support forum.

Note that if you need help in the future, you can ask a new question on support.mozilla.org.

but i wish that firefox developers and engineers help me. how can i contact programmers directly and get help for my firefox?

i am interested in learning firefox, love firefox and studied tens of bugs and helps, but wish to learn more and even learn about:config preferences more and more!

(In reply to Gingerbread Man from comment #11)

(In reply to zahra from comment #9)

i tried with the file which i attached hear and it now is displayed correctly.
really i appreciate your help, God bless you!

You're welcome.

but what should i do with text files?

I tested Firefox 52.9.0 ESR, which is the last version that works on Windows XP. I pasted some text from Farsi Wikipedia and saved it as a UTF-8 file in Windows Notepad. It displayed correctly.
If you open the text file in Notepad++ it should say "UTF-8-BOM" in the status bar at the bottom of the window. If it doesn't,

  1. Create a new blank file in Notepad++.
  2. From the Encoding menu, choose Convert to UTF-8-BOM.
  3. Paste the text from the original file.
  4. Save as a new file and double-check that it displays correctly in Firefox.

intl.charset.fallback.utf8_for_file
in about:config
did not work for me.

That preference was added in Firefox 59 and removed in Firefox 66 (bug 1071816). I tested a local plain text file that was UTF-8 without BOM (Byte Order Mark) and it displayed correctly, so it's no longer needed.

i tested with different versions of firefox even older than 52 and firefox displayed these type of documents correctly when i set text BOM.
utf-8 with BOM! is very predictable and i had no issue when openning them with firefox.
i dont know how to appreciate you for your great advice!
i heard that using text files with BOM is not recommended! why some websites or people dont recommend this method when all softwares can recognize and display such files without issue?
i never use windows notepad. i always use notepad++ to create and save my text files, and i decided to set notepad++ to save always as text with bom. is it good?
in notepad++, for me my nvda screen reader, does not read the status bar.
nvda when i press insert +end, to read status bar, just read the last line of file and does not read the status bar unfortunately!
how firefox 66 and later, can display the text utf-8 files without BOM correctly without the preference
intl.charset.fallback.utf8_for_file?
does it work always and even utf-8 without BOM (which is not predictable), became predictable in firefox 66?!

(In reply to Henri Sivonen (:hsivonen) from comment #12)

why did you remove such useful feature

Because of the effects it would have on the Web if creators of Web content used the configuration you wish to use and ended up relying on it.

i believe that its the choice for any user that can select favorite version of firefox and use it forever.

Then you are stuck with the behavior of that version.

This is a bug database and not a support forum. The purpose of Bugzilla isn't to provide assistance in configuring past versions of Firefox but to track changes to future versions of Firefox, and future versions can't help you if you can't/won't use them.

you wrote:

Because of the effects it would have on the Web if creators of Web content used the configuration you wish to use and ended up relying on it.

i dont understand. i loved this feature and had not any issue in both text and html files.

so, i wished to have it again, (especially when i did not know what should i do that i dont need every times use view menu, encoding, and checked utf-8!

(In reply to Gingerbread Man from comment #11)

(In reply to zahra from comment #9)

i tried with the file which i attached hear and it now is displayed correctly.
really i appreciate your help, God bless you!

You're welcome.

but what should i do with text files?

I tested Firefox 52.9.0 ESR, which is the last version that works on Windows XP. I pasted some text from Farsi Wikipedia and saved it as a UTF-8 file in Windows Notepad. It displayed correctly.
If you open the text file in Notepad++ it should say "UTF-8-BOM" in the status bar at the bottom of the window. If it doesn't,

  1. Create a new blank file in Notepad++.
  2. From the Encoding menu, choose Convert to UTF-8-BOM.
  3. Paste the text from the original file.
  4. Save as a new file and double-check that it displays correctly in Firefox.

intl.charset.fallback.utf8_for_file
in about:config
did not work for me.

That preference was added in Firefox 59 and removed in Firefox 66 (bug 1071816). I tested a local plain text file that was UTF-8 without BOM (Byte Order Mark) and it displayed correctly, so it's no longer needed.

you wrote:
bug 1071816). I tested a local plain text file that was UTF-8 without BOM (Byte Order Mark) and it displayed correctly, so it's no longer needed.
i studied
bug 1071816
but i wish to explain my understanding about this bug and ask you did i understand it correctly?
i realized that:
while utf-8 is not recognizable for softwares without BOM,
but, utf-8 without BOM became recognizable in firefox 66 without intl.charset.fallback.utf8_for_file.

if so, does it work the same as setting fallback text encoding: utf-8 in options, content, advance, worked in firefox 27 and previous ones?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: