Closed Bug 1138608 Opened 10 years ago Closed 8 years ago

nsIExternalProtocolService.loadUrl throws NS_ERROR_ILLEGAL_INPUT for urls containing umlauts encoded with ISO-8859-1

Categories

(Core :: Networking, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 770022
Tracking Status
thunderbird_esr38 --- affected

People

(Reporter: aryx, Unassigned)

References

Details

(Whiteboard: [necko-would-take])

Thunderbird Daily 39.0a1 + Earlybird 38.0a2 20150302 on Windows 8.1 The Amazon and eBay search engines are not working if the search term contains encoded non-ASCII characters. Steps to reproduce: 1. Create a new message with the body "schönes Wetter". 2. Save the message. 3. Open the Options. 4. Change the search engine under 'General' to Amazon.com 5. Open the Drafts folder and select the mail created earlier. 6. Select 'schönes Wetter'. 7. Open the context menu. 8. Amazon.com search for "schönes Wetter". Error thrown: Error: [Exception... "Component returned failure code: 0x8050000e (NS_ERROR_ILLEGAL_INPUT) [nsIExternalProtocolService.loadUrl]" nsresult: "0x8050000e (NS_ERROR_ILLEGAL_INPUT)" location: "JS frame :: chrome://communicator/content/contentAreaClick.js :: openLinkExternally :: line 150" data: no] Source: resource://gre/components/nsSearchService.js Line: 4145 Both search engines use ISO-8859-1 as input encoding. This error may have been in the product for a longer time and only got exposed after bug 923656 landed. Needinfoing squib if he knows what's up.
Flags: needinfo?(squibblyflabbetydoo)
It's entirely possible that this is a Gecko issue. I'm not sure how often people really use nsIExternalProtocolService.loadUrl.
Flags: needinfo?(squibblyflabbetydoo)
Indeed a Gecko issue.
Component: Search → Networking
Product: Thunderbird → Core
Summary: Amazon and eBay search engines not working if search term contains encoded non-ASCII characters → nsIExternalProtocolService.loadUrl throws NS_ERROR_ILLEGAL_INPUT for urls containing umlauts encoded with ISO-8859-1
With eBay set as default search engine, this code snippet: let url = Services.search.defaultEngine.getSubmission("schönes Wetter").uri.spec; if (!(uri instanceof Components.interfaces.nsIURI)) uri = Services.io.newURI(url, null, null); Components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Components.interfaces.nsIExternalProtocolService) .loadUrl(uri); throws NS_ERROR_ILLEGAL_INPUT: Component returned failure code: 0x8050000e (NS_ERROR_ILLEGAL_INPUT) [nsIHandlerInfo.launchWithURI]
Mozilla/5.0 (Windows NT 6.1; rv:39.0) Gecko/20100101 Thunderbird/39.0a2 Our Japanese searchplugins has same issue. For example, rakuten.xml sends the search term as EUC-JP. http://hg.mozilla.org/releases/l10n/mozilla-aurora/ja/file/ee19d9ad3e32/mail/searchplugins/rakuten.xml When I search a term that contains non-ascii char, same error is thrown. Error: NS_ERROR_ILLEGAL_INPUT: Component returned failure code: 0x8050000e (NS_ERROR_ILLEGAL_INPUT) [nsIExternalProtocolService.loadUrl] Source File: chrome://communicator/content/contentAreaClick.js Line: 151 Error: [Exception... "Component returned failure code: 0x8050000e (NS_ERROR_ILLEGAL_INPUT) [nsIExternalProtocolService.loadUrl]" nsresult: "0x8050000e (NS_ERROR_ILLEGAL_INPUT)" location: "JS frame :: chrome://communicator/content/contentAreaClick.js :: openLinkExternally :: line 151" data: no] Source File: resource://gre/components/nsSearchService.js Line: 4145 If I set the value of "InputEncoding" tag to "UTF-8", it works well on Thunderbird side. (However, on server side, the search term is sent as incorrect character encoding.)
Whiteboard: [necko-would-take]
Nice and clear bug description. I've just fixed the messier bug 770022 which is basically the same thing. However, check bug 770022 comment #48 for some potential follow-up issues. Also see bug 1338758.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Actually, please test this with a current Daily and see whether the search works now. While NS_ERROR_ILLEGAL_INPUT is no longer returned, maybe the Umlaute are still not passed on correctly, which would then require another bug along the lines of bug 770022 comment #32, bug 770022 comment #33 or bug 770022 comment #48, which Boris has already asked for.
Flags: needinfo?(aryx.bugmail)
Fixed with Daily 54.0a1 20170211030204 on Windows 8.1 and the search engine set to Amazon.
Flags: needinfo?(aryx.bugmail)
You need to log in before you can comment on or make changes to this bug.