Closed Bug 327319 Opened 18 years ago Closed 18 years ago

Some search plugins are not correctly coded in UTF-8

Categories

(Mozilla Localizations :: es-ES / Spanish, defect)

x86
All
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mrwarper, Assigned: rpmdisguise-nave)

References

()

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; es-ES; rv:1.7.12) Gecko/20050922
Build Identifier: http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/1.0/seamonkey-1.0.en-US.win32.zip, http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/1.0/contrib/seamonkey-1.0.en-US.os2.zip

English-Spanish and Spanish-English dictionary entries in plugin search list show incorrect characters, probably because the .src files ARE NOT UTF-8. Perhaps there are more files to be checked, just these two showed up.

Reproducible: Always

Steps to Reproduce:
1. Unzip SeaMonkey (OS/2 or Windows versions tested, others should behave the same)
2. Install the es-ES and ES regional content packages
3. Pick search plugins from the list to make it display them
Assignee: bmo → rpmdisguise-otros
From

http://mycroft.mozdev.org/deepdocs/searchtag.html#c13, http://mycroft.mozdev.org/deepdocs/searchtag.html#c23 and http://mycroft.mozdev.org/deepdocs/searchtag.html#c42

Actually, the encoding can be set through the parameter sourceTextEncoding and, as the searchplugin definition itself, is based on Mac. Unfortunately, the only encoding valid for western languages like spanish is mac-roman, which sets acuted characters in different decimal values than ISO-8859-1. I have to play with the values using an hex-editor. More info will be added as I progress.
Yup, it works. :-) Search plugins don't use UTF-8, but (for western languages) Mac-Roman.

Using an hex editor and checking character codes in this page:

http://www1.tip.nl/~t876506/utf8tbl.html

I've been able to fix the weird characters. To use the table in the above link, the searchplugin file should be first in pure ASCII, mostly to ensure than one characters uses just one byte (not two, as it may happen if the file is encoded as UTF-8). Then, with an hex editor, just replace the wrong bytes with the right value in the column "hx". For instance, to let the searchplugin show a "ñ" (the equivalent to ñ in HTML entities), use hex value "96" (decimal 150).

I attach the two searchplugins with wrong characters.
Download this file and place it into the searchplugins directory inside Mozilla/SeaMonkey installation. I think it should also work for Firefox.
Download this file and place it into the searchplugins directory inside Mozilla/SeaMonkey installation. I think it should also work for Firefox.
I will update the files in content/region pack ("reges.xpi") and in defaults ("defleses.xpi") XPIs. As I will probably have to update the Windows installer, it will ship with the update.

I'll close this bug in a couple of days if no comments are done against it.
Hello,

(In reply to comment #6)
> I will update the files in content/region pack ("reges.xpi") and in defaults
> ("defleses.xpi") XPIs. As I will probably have to update the Windows installer,
> it will ship with the update.
> 
> I'll close this bug in a couple of days if no comments are done against it.

<Changing status to FIXED. If further action is needed, DIY>
You can close it now. It works me, so it'll work for everyone.
And if not, it simply does not work ;)

Everything looks OK 'ere.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: