implement "User-Defined" charset

VERIFIED FIXED in M17

Status

()

Core
Layout
P3
normal
VERIFIED FIXED
18 years ago
12 years ago

People

(Reporter: Erik van der Poel, Assigned: Gary L. Wade)

Tracking

({pp, relnote})

Trunk
All
Other
pp, relnote
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+]Exception Feature (ETA-6/9))

(Reporter)

Description

18 years ago
The old Communicator code base has a menu item labelled "User-Defined" in the
charset menu. We probably need to support this in the new Mozilla.

For all ASCIIs (0x00 - 0x7F), just map directly to Unicode (U+0000 - U+007F).
All other byte values (0x80 - 0xFF) should be mapped to the Unicode Private Use
Area (U+E000 - U+F8FF). More specifically, U+E000 - U+E07F. In the font engine,
we map in the opposite direction, to get back the original bytes, and then use
whatever font the user has chosen for User-Defined.

On Windows, we obviously cannot use the "W" functions (GetTextExtentPoint32W
and ExtTextOutW), since they expect Unicode, and wouldn't know what to do with
PUA characters. So let's use the "A" functions. The old code base used
ANSI_CHARSET in LOGFONT to accomplish this.

On Unix, just convert back to the original bytes, and pass them to the 8-bit
measure/draw functions. (Consistent with old code base.)

On Mac, convert back to the original bytes, and do whatever the old code base
did.

Need to spec out the charset issues too. E.g. if HTTP/META charset is unknown,
and User-Defined menu item is selected, use that. If HTTP/META charset is
known, but user has used the override feature to specify User-Defined, use
that.
(Reporter)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M15
(Reporter)

Comment 1

18 years ago
From: ftang@netscape.com (Yung-Fong Tang)

I propose we do the following
1. Create a "user defined" encoding converter which convert 0x80-0xFF to
U+F780 - U+F7FF back and forth.

Rational of the mapping range
1. The Private Use Area is defined from U+E000 - U+F8FF
2. Apple use U+F8A1 to U+F8FF for Apple specific chars.
3. Microsoft use U+E000 - U+EDE7 for Chinese/Japananese/Korean EUDC chars

Issues
1. How we convert 0x01 - 0x1F ? I know some hacky encoding use some chars in
that range for some human readable text instead of control code.
(Reporter)

Updated

18 years ago
Target Milestone: M15 → M9

Updated

18 years ago
Depends on: 8280

Comment 2

18 years ago
Do we have a list of the hacking encodings that use the 0x01 - 0x1F range?
(Reporter)

Comment 3

18 years ago
Some additional info from bug 7569:

Till netscape 4.51, users were able to install their own *.bdf fonts
and view pages meant for that font.

Is their any provision like that in SeaMonkey now?
The page give www.vikatan.com uses fonts from www.murasu.com/download.html

This font is very popular in Tamil language(of India)

(End of excerpt.)

I downloaded the fonts from the above site, and had a look. They appear to use
normal ASCII in the 0x00-0x7F range, which is good news.
(Reporter)

Comment 4

18 years ago
*** Bug 7569 has been marked as a duplicate of this bug. ***

Updated

18 years ago
Target Milestone: M9 → M10

Comment 5

18 years ago
Moved to M10
(Reporter)

Comment 6

18 years ago
Note to myself:

+           /*
+            * XXX Turn prevFont into an object with GetWidth and DrawString
+            * methods. The object should do one of the following:
+            * 1. call the "W" function for normal Unicode strings,
+            * 2. call the "A" function for User Defined,
+            * 3. call the "A" function for Symbol, or
+            * 4. return the width of several boxes for missing glyphs.
+            */
            ::SelectObject(mDC, prevFont->font);
            ::GetTextExtentPoint32W(mDC, &aString[start], i - start, &size);
(Reporter)

Updated

18 years ago
Target Milestone: M10 → M11

Comment 7

18 years ago
Adding lyecies@netscape.com to cc list.
(Reporter)

Updated

18 years ago
Target Milestone: M11 → M12

Updated

18 years ago
Target Milestone: M12 → M16

Comment 8

18 years ago
post-Beta1 feature
(Reporter)

Comment 9

18 years ago
Moving all M16s to M17. Please make comments if you disagree.
Target Milestone: M16 → M17

Comment 10

17 years ago
Since this appears in the UI, we should release note that this is not done
for Beta1.
Keywords: relnote

Comment 11

17 years ago
Shouldn't this be in by Beta2, therefore by M16?
(Reporter)

Updated

17 years ago
Target Milestone: M17 → M16
(Reporter)

Comment 12

17 years ago
Hi Juraj, Bob and I thought that this might be a good one for you. Let's
discuss this when you have finished your other tasks.
Assignee: erik → jbetak
Status: ASSIGNED → NEW
Hi Erik,

looks like fun, I'm taking it on board :-) I hope to be finished with the accept 
language UI soon, maybe we can talk then...
Status: NEW → ASSIGNED
(Reporter)

Comment 14

17 years ago
I checked in the User-Defined support for Unix. Now I will work on Windows.
Re-assigning to myself.
Assignee: jbetak → erik
Status: ASSIGNED → NEW
for some reason I still apprear as owner of this bug; reassigning to erik
(Reporter)

Updated

17 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 16

17 years ago
Checked in User Defined support for Windows. Over to Frank for the Mac.
Assignee: erik → ftang
Status: ASSIGNED → NEW

Updated

17 years ago
Status: NEW → ASSIGNED
Keywords: nsbeta2

Comment 17

17 years ago
move to M17
Target Milestone: M16 → M17

Comment 18

17 years ago
Putting on [nsbeta2+][5/16] radar.  I18n would REALLY like this in for beta2.
Whiteboard: [nsbeta2+][5/16]

Comment 19

17 years ago
reassign garywade@desisoftsystems.com
Assignee: ftang → garywade
Status: ASSIGNED → NEW

Comment 20

17 years ago
Added keywords: pp  (works on Win and Linux, but not Mac), and
                4xp (been a browser feature for years).
Keywords: 4xp, pp

Comment 21

17 years ago
On exception list for PR2, removing 5/16...giving [nsbeta2+]Exception Feature 
status.
Whiteboard: [nsbeta2+][5/16] → [nsbeta2+]Exception Feature

Comment 22

17 years ago
ascii part is convert to ASCII part in Unicode.
80-FF is convert to F780 to F7FF in unicode 
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED

Comment 23

17 years ago
add ETA info for gary
Whiteboard: [nsbeta2+]Exception Feature → [nsbeta2+]Exception Feature (ETA-6/9)
(Assignee)

Comment 24

17 years ago
Changed the following files to add this new feature and to make the font settings 
changes more complete, as referenced in Bug 30300.

mozilla/gfx/macbuild/gfx.mcp
mozilla/gfx/src/mac/nsFontMetricsMac.cpp
mozilla/gfx/src/mac/nsUnicodeBlock.h
mozilla/gfx/src/mac/nsUnicodeFontMappingMac.cpp
mozilla/gfx/src/mac/nsUnicodeFontMappingMac.h
mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp
mozilla/gfx/src/mac/nsUnicodeMappingUtil.h
mozilla/gfx/src/mac/nsUnicodeRenderingToolkit.cpp
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 25

17 years ago
Marking verified fixed in June 20th build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.