Closed Bug 33782 Opened 24 years ago Closed 24 years ago

Fix lower/upper case and alias resolution issues for charset names

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: cata, Assigned: cata)

References

Details

Lately we were hit by a few bugs generated by the lowercase/uppercase 
representation of the charset names. It's time to fix this.

The rule is to use only cannonical charset names everywhere. This will be 
achieved by using a special object to identify a charset for all purposes. This 
object can only be obtained by calling a certain API. This API will do alias 
resolution. The objects will then be unique, like Atoms, so a comparison will 
only mean comparing pointers.

Steps:
1) Create the interface for the charset object.
2) Create the API creating these objects.
3) Move people to use this new API.
4) Deprecate old API(s).

Possible issue I need to look into: ProgID's are also case sensitive.
Future impovement thought: nicer alias properties file format.
Target Milestone: --- → M15
Added bugs that depend upon this.
When will this land?  If not real soon, let's provide some workarounds for
the crashing bugs that depend upon this.
Blocks: 32604, 32785, 33029
This will land real soon. (1-2 days) But the work is being done on the tip, so 
it won't fix the beta1 crashes...
Status: NEW → ASSIGNED
Tip is fine.
1-2 days is to complete the API or to migrate all code to use the new API?
Do you know how many places need to be changed?
In an attempt to minimise the amount of necessary work and time, I'll try to use 
nsIAtom as the charset type. That means that the interface & the new API are 
already there. What's left to do is just a fix on the API implementation (ready 
in my tree) and then step 3&4.

Possible issues when using nsIAtom instead of an "nsICharset":
- maybe some performance loss from going to the Atom engine
- people creating directly the Atom instead of going through GetCharsetAtom() 
If these problems will hurt us, we can switch to nsICharacterSet at any time.

Now, the idea for a so-called Step 6) for the future: improvement of the 
GetCharsetAtom() implementation. Right now, it is build on top of two things: 
the nsCharsetAlias service and the Atom engine. We can improve on both. First, 
make the nsCharsetAlias better, with its own hash table (not the StringBundle 
anymore) and a nicer file format. Second, reimplement the Atom engine for the 
specific Charset case - more optimal. Finally, unify the two for even better 
performance.
Target Milestone: M15 → M17
QA Contact: teruko → cata
Mark it as won't fix. 
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.