Firefox returns these characters: îñðåäè îïàñíûõ, when I search inside a particular website.
May I add this is only happening with Firefox. Thx for you help.
Chosen solution
Sorry I wasn't able to look in on this thread sooner. Glad you got it sorted and figured out Greasemonkey. I'm sure it will come in handy for other sites, too.
Skaityti atsakymą kartu su kontekstu 👍 0All Replies (20)
I have just uploaded an image of this issue.
It's happening in this particular Russian website, and only in Firefox, whether stable, beta, Nightly, or ESR. Other browsers display the site fine, so I assume the problem is only with Firefox.
Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?
This sounds like an issue with the text encoding.
What encoding is selected when you check this in "View -> Text Encoding" and in "Tools -> Page Info -> General" as send by the server?
Does "Tools -> Page Info -> General" mention any specific encoding in the meta tag section that is part of the page code?
I notice in your screenshot that Firefox's Tracking Protection feature is blocking some content. I don't know whether that could include fonts or whether it has any relevance at all, but do you want to try making an exception?
Click the shield icon toward the left end of the address bar, near the lock icon, to drop a panel that allowing making an exception (the page will reload). More info on managing the Tracking Protection feature in this article: What happened to Tracking Protection?.
Just in case uBlock Origin is a factor (I think I see its icon there), you could check the button for info on what is blocked and see whether exceptions make any difference.
Thank you. No authentication is required. It's a public page.
Text encoding shows up as Western but should be Cyrillic (Windows). On other Russian websites Firefox detects the encoding correctly, but on this one it does not.
I've turned off all tracking and content blocking, restarted with addons disabled, refreshed Firefox, used a new profile, reinstalled fresh, but to no avail. The only thing I can think of is that it's a setting in about:config that needs to be changed/added because Edge and Chrome display this website correctly.
Can you answer my questions about what Tools -> Page Info -> General shows about the encoding?
Firefox always uses the encoding as send by the server via the HTTP response headers. Only if the server doesn't send an encoding then Firefox can use an encoding that is specified via a meta tag in the page (html) code.
Text Encoding is: Windows-1252. I'm uploading a screenshot of this. BTW, this issue occurs when I search in the website, in the search box of the site. The resultant search brings up these characters.
Works fine for me with Windows-1251 encoding as shown in the meta tag section in the screenshot. The server doesn't send an encoding via the HTTP response headers if I check this in the Network Monitor, so that shouldn't be a problem.
Firefox might have stored a wrong content-type in the Site Preferences.
You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History -> Show All History" or "View -> Sidebar -> History").
Using "Forget About This Site" will remove all data stored in Firefox from this domain like history and cookies and passwords and exceptions and cache, so be cautious. If you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.
You can't recover from this 'forget' unless you have a backup of involved files.
If you revisit a 'forgotten' website then data from that website will be saved once again.
Thank you, I did "Forget About This Site", but still the same. When I enter a search word (or term) in the search box of this site, these strange characters replace the original language, Russian...as in the first screenshot I uploaded of this site...
Please go to the website and enter a search term (a name of a film, for example) in the search box, press search and see if you get the same result...
Please go to the website and enter a search term (a name of a film, for example) in the search box, press search and see if you get the same result...
OK, if I use the search bar like you wrote then I do get Windows-1252 and not Windows-1251 encoding and I need to change the encoding via "View -> Text Encoding". I don't know what goes wrong here because I'm not seeing this request in the Network Monitor.
Modified
Yes, for some reason the encoding changes from
Windows-1251 -- Text Encoding: "Cyrillic (Windows)"
on the page before submitting a search to
Windows-1252
on the page after submitting a search.
The only difference seems to be how the page was requested:
- links trigger a GET request
- the search form sends a POST request
If I use the Page Inspector to change the form tag from method="post" to method="get", then the page with the search results displays in Windows-1251 as expected. See attached screenshots.
I don't know why Firefox behaves differently between GET and POST.
OK, thx cor-el. I'll just do that, change the encoding when I search on this site. It would be nice to know , though, what is going on. Thanks again for you help.
Thx jscher2000, that's right, I just changed the form tag to "get" also. It would be nice to know why Firefox behaves differently from other browsers in this particular situation. And, is there any way I can modify this permanently, or it it up to the site owner...? Thanks again for you help and clarification.
@jscher2000 and/or @cor-el, what would be the css code to change the encoding from "post" to "get"? I want to put this in the userContent.css file in my profile with the address of the website to make the change permanent, well at least on my computer. Thanks again for your help.
Unfortunately, CSS cannot change the attribute value on a tag. However, an extension or a user script could do that. A user script is a brief script you apply to a site using an extension like Tampermonkey, Greasemonkey, or Violentmonkey.
For example, to change the two search boxes in the content area of the page:
var forms = document.querySelectorAll('#middle #container #content form');
for (var i=0; i<forms.length; i++){
forms[i].setAttribute('method', 'get');
}
You also could run that as a "bookmarklet," which is a script you save as a bookmark. To run the script, you click the bookmark button (on the toolbar or menu). A bookmarklet has a couple extra parts:
javascript:var forms = document.querySelectorAll('#middle #container #content form'); for (var i=0; i<forms.length; i++){forms[i].setAttribute('method', 'get');} void 0;
Thank you. I ran it as a "bookmarklet", but nothing happened. I put the script in the Location box of the bookmark's properties, however, I get file not found. I put the script after the website's address, but something's not right...please advise.
Sorry, to set up a bookmarklet:
Right-click the spot on the Bookmarks Toolbar or Bookmarks Menu where you want the script and click New Bookmark.
Paste the script into the Location field. Make sure there is no http: or https: protocol at the beginning, it needs to start with javascript:
In the name field, you can put something like Post2Get or whatever makes sense to you.
Then click the Add button.
The script should be ready to run now.
Thanks, but don't I need to keep the website address in the Location field, else nothing happens with just the script...? Or where do I put the site address...?