Closed Bug 1565779 Opened 5 years ago Closed 5 years ago

Various search engines are using the wrong encoding for search parameters after switch to WebExtensions

Categories

(Firefox :: Search, defect, P1)

68 Branch
Desktop
Windows 10
defect
Points:
1

Tracking

()

VERIFIED FIXED
Firefox 70
Iteration:
70.1 - Jul 8 - 21
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 68+ verified
firefox68 + verified
firefox69 + verified
firefox70 + verified

People

(Reporter: alice0775, Assigned: daleharvey)

References

(Regression)

Details

(Keywords: jp-critical, regression)

Attachments

(5 files, 1 obsolete file)

[Tracking Requested - why for this release]: Completely broken

Firefox67 ja build works as expected.
Firefox68 ja build is broken.

Reproducible : always

Steps to Reproduce:

  1. Enable search bar
  2. type japanese text e.g,"パソコン"
  3. Click ヤフオク or 楽天市場 on-off search button

Actual results:
Unable search in japanese text due to Mojibake.

Expected Results:
Search should successfully perform.

Summary: Mojibake in search with ヤフオク and 楽天市場 of built-in search engine → Mojibake in search Japanese word with ヤフオク and 楽天市場 of built-in search engine
Summary: Mojibake in search Japanese word with ヤフオク and 楽天市場 of built-in search engine → [ja]: Mojibake in search Japanese word with ヤフオク and 楽天市場 of built-in search engine

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c77962add953a48bdbcbbcd3d157d63d1267cd8e&tochange=a632dfa60af6edd4f7dd03d404d898b6222b56c3

Regressed by:Bug 1496075

Dale Harvey,
your bunch of patch seems to cause the regression. Can you please look into this?

Component: ja / Japanese → Search
Flags: needinfo?(dharvey)
Product: Mozilla Localizations → Firefox
QA Contact: l10n-qa
Regressed by: 1496075
Version: unspecified → 68 Branch

{
"name": "ヤフオク!",
"version": "1.0",
"isActive": true,
"id": "yahoo-jp-auctions@search.mozilla.org"
},
{
"name": "楽天市場",
"version": "1.0",
"isActive": true,
"id": "rakuten@search.mozilla.org"
},

Assignee: nobody → dharvey
Flags: needinfo?(dharvey)
Attachment #9077933 - Attachment description: Bug 1565779 - Add encoding to ann non UTF-8 engines. → Bug 1565779 - Add encoding to non UTF-8 engines.

I missed the need to translate the InputEncoding field of the original engines, we default to UTF-8 @ https://searchfox.org/mozilla-central/source/toolkit/components/search/SearchService.jsm#2242 so filed in all the non utf-8 versions

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0f65f89559b5
Add encoding to non UTF-8 engines. r=Standard8

Overall this affects:

  • sv-SE: Allaannonser
  • ca: DIEC2
  • kn: Kannada Store
  • ru: OZON.ru
  • pt-PT: Priberam
  • ja/ja-JP-macos:
    • rakuten (楽天市場)
    • yahoo-jp-auctions (ヤフオク!)
  • hu: Vatera.hu
  • sk: Zoznam
Summary: [ja]: Mojibake in search Japanese word with ヤフオク and 楽天市場 of built-in search engine → Various search engines are using the wrong encoding for search parameters after switch to WebExtensions

Comment on attachment 9077933 [details]
Bug 1565779 - Add encoding to non UTF-8 engines.

Beta/Release Uplift Approval Request

  • User impact if declined: Built in search engines in particular locales will be broken, list of engines @ https://bugzilla.mozilla.org/show_bug.cgi?id=1565779#c7 will be broken
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: STR listed in https://bugzilla.mozilla.org/show_bug.cgi?id=1565779#c0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Adds a parameter to search engine requests that was missed in an automated conversion
  • String changes made/needed:
Attachment #9077933 - Flags: approval-mozilla-beta?
Attachment #9077933 - Flags: approval-mozilla-release?
Attachment #9077933 - Flags: approval-mozilla-esr68?
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Flags: qe-verify+
Iteration: --- → 70.1 - Jul 8 - 21
Points: --- → 1

Comment on attachment 9077933 [details]
Bug 1565779 - Add encoding to non UTF-8 engines.

Fixes broken search engines in some locales. Approved for 69.0b5.

Attachment #9077933 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Any reason you're using non-standard encoding names?

ISO-8859-1 is just a label of windows-1252 and WINDOWS-1251, WINDOWS-1250 should be lowercase according to the standard: https://encoding.spec.whatwg.org/

Alice, is this an issue for search in TB 68 beta 4? Then we'd need to port this to TB in a new bug.

Flags: needinfo?(alice0775)
Blocks: 1566200

(In reply to Jorg K (GMT+2) from comment #15)

Alice, is this an issue for search in TB 68 beta 4? Then we'd need to port
this to TB in a new bug.

I filed a new Bug 1566200

Flags: needinfo?(alice0775)

(In reply to Jorg K (GMT+2) from comment #14)

Any reason you're using non-standard encoding names?

ISO-8859-1 is just a label of windows-1252 and WINDOWS-1251, WINDOWS-1250 should be lowercase according to the standard: https://encoding.spec.whatwg.org/

We've simply restored what we were using before, which considering the patch is going to a dot release is probably the safest thing to do.

I'm guessing in this case it probably doesn't matter seeing as I think we handle the encoding internally and that doesn't seem to complain. Also I couldn't actually see in the spec where it said they must be lowercase. I saw some references to case-insensitive, but nothing appeared directly relevant to the case of the encoding labels.

Build Id 20190716001037
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

I just test Noghtly70.0a1 ja build with clean new profile.
However, the problem is not foxed.
I can still reproduce the issue.

Dale Harvey, What's going on?

Flags: needinfo?(dharvey)
Attachment #9078327 - Attachment is obsolete: true

I can confirm this doesn't seem to be fixed on the latest jp build on Mac. I think I see what the issue is - the encoding has been added at the wrong place in the manifest files. I'm trying to confirm.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Dale said when he tested the script the encodings were in the right place, but somehow ended up in the wrong place. I missed that in reviewing.

I've tested this locally for Rakuten and yahoo-jp-auctions by adding a section to list.json and using that.

Flags: needinfo?(dharvey)

Yeh this was my mistake, I tested in the correct place, check where it was supposed to be, then for some reason wrote the final patch wrong, r+ fix is good

Landing triggered, but trees are currently closed.

Comment on attachment 9078340 [details]
Bug 1565779 - Move encoding definitions to the correct location in the search engine manifest files. r?daleharvey

Beta/Release Uplift Approval Request

  • User impact if declined: See comment 9, this is a follow-on patch.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Corrects the initial patch. Unfortunately we missed getting the parameter in the right place, testing the different engines is hard at the moment, and we want to make that easier (bug 1566377).
  • String changes made/needed: None
Attachment #9078340 - Flags: approval-mozilla-release?
Attachment #9078340 - Flags: approval-mozilla-esr68?
Attachment #9078340 - Flags: approval-mozilla-beta?
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/60884ef3024b
Move encoding definitions to the correct location in the search engine manifest files. r=daleharvey
Priority: -- → P1

Comment on attachment 9078340 [details]
Bug 1565779 - Move encoding definitions to the correct location in the search engine manifest files. r?daleharvey

Follow-up fix to the previous patch. Approved for 69.0b6.

Attachment #9078340 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
QA Whiteboard: [qa-triaged]

Comment on attachment 9077933 [details]
Bug 1565779 - Add encoding to non UTF-8 engines.

search fix, approved for 68.0.1 and 68.1esr

Attachment #9077933 - Flags: approval-mozilla-release?
Attachment #9077933 - Flags: approval-mozilla-release+
Attachment #9077933 - Flags: approval-mozilla-esr68?
Attachment #9077933 - Flags: approval-mozilla-esr68+
Attachment #9078340 - Flags: approval-mozilla-release?
Attachment #9078340 - Flags: approval-mozilla-release+
Attachment #9078340 - Flags: approval-mozilla-esr68?
Attachment #9078340 - Flags: approval-mozilla-esr68+

I've just done a spot check of the two ja-JP-mac locale engines and they seem to be working fine now on latest nightly.

Verified as fixed on Firefox Nightly 70.0a1 (2019-07-17) ja build on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 18.04 x64.

Verified as fixed on Firefox 68.0.1esr and on Firefox 68.0.1 ja build on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 18.04 x64.

Verified as fixed on Firefox 69.b06 ja build on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 18.04 x64.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: