Error: charset.trim is not a function in ja locale, changing character encoding on about:firefox

VERIFIED FIXED

Status

Fennec Graveyard
General
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: wesj)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
With the Maemo Japanese locale build of Firefox4.0.1 (build 1) candidate, I'm seeing these js error in the console, when changing the character encoding on about:firefox.

charset.trim is not a function
chrome://browser/content/common-ui.js
1430
currentCharset.trim is not a function
chrome://browser/content/common-ui.js
1473

Steps to reproduce:
- Go to about:firefox
- Click on the icon in the url bar, choose the character encoding entry (I know, it's japanese)
- Choose one of the available options.

I haven't tested this on trunk yet, nor on Android, using the japanese build.
(Assignee)

Updated

7 years ago
Assignee: nobody → wjohnston
(Reporter)

Comment 1

7 years ago
Ok, I can see this on a 4/12 trunk build on Android too (using Droid), using the US locale.
A little bit different steps to reproduce, though:
- You have to have "Show Character Encoding" enabled in the prefs (in options)
- go to about:firefox
- Tap on the icon in the url bar, tap on Character Encoding entry
- Choose one of the options.
- Tap on the icon in the url bar again.

In this case I'm only seeing the "charset.trim is not a function" error.
(Assignee)

Comment 2

7 years ago
Created attachment 526754 [details] [diff] [review]
Patch

Whoops. forcedCharset actually returns an nsIAtom, but for remote tabs I am being tricky and actually returning a string. For local tabs, we get the nsIAtom.

This just calls toString on the charset so that it will work regardless of what is returned.
Attachment #526754 - Flags: review?(mark.finkle)
Attachment #526754 - Attachment is patch: true
Attachment #526754 - Attachment mime type: application/octet-stream → text/plain
Attachment #526754 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 3

7 years ago
http://hg.mozilla.org/mozilla-central/rev/725ea124833d
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Comment 4

7 years ago
Verified fixed on build: Mozilla /5.0 (Android;Linux armv7l;rv:6.0a1) Gecko/20110508 Firefox/6.0a1 Fennec/6.0a1 
Device: LG Optimus 2X (Android 2.2)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.