Open Bug 1811080 Opened 2 years ago Updated 2 years ago

Specify character encoding for search engines

Categories

(Firefox :: Search, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: andremonizbr, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0

Steps to reproduce:

  • Enable *browser.urlbar.update2.engineAliasRefresh`
  • Go to about:preferences#search and create a search shortcut for http://www2.trt12.gov.br/aurelio/pesquisa.asp?strTexto=%s
  • Search for ação

Actual results:

The search string isn't processed correctly because the site doesn't use Unicode.

Não foi encontrado o verbete ação.

Expected results:

There should be a way for users to specify what character encoding to use with custom search engines. Bookmark keywords allow this with the mozcharset parameter:

http://www2.trt12.gov.br/aurelio/pesquisa.asp?strTexto=%s&mozcharset=iso-8859-1
Blocks: 1653261
Component: Untriaged → Search
Blocks: 1650894
No longer blocks: 1653261

In the future there should likely be a charset stored with the keyword, coming from the "Add keyword for this search" (and thus fetched from the page content itself at the time the keyword is created). The search service should likely have a charset defined for the custom engine.
What happens today is that bookmark keywords rely on History having a charset annotation for the page or on the mozcharset param, though in most cases that param won't be there, first because it's not well documented, second because the user is likely creating a keyword by just right clicking on input fields and picking "Add keyword for this search".

Based on your comment can I mark the issue as New - Enhancement? Thank you.

Flags: needinfo?(mak)

Sure thing, let me do it.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Flags: needinfo?(mak)
Blocks: 1653261
Severity: -- → N/A
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.