Closed
Bug 81200
Opened 23 years ago
Closed 23 years ago
GB18030 encoder issues.
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.1
People
(Reporter: ftang, Assigned: ftang)
References
Details
(Whiteboard: patch ready. need sr)
Attachments
(5 files)
Spin off from 75928
------- Additional Comments From Masaki Katakai 2001-05-16 01:21 -------
Hi Frank,
I have a question about conversion. I'm now working PS support in gfx/ps module
and it needs to convert unicode to native gb18030 code if user wants to use
gb18030 (GBK2K based) PS fonts.
However, it seems that the following operation fails (blank code is generated)
on my environment. Can you check this?
I use UNICODE 0x340f for example,
1. ./nsconv -f -f gb18030 -t unicode gb18030_file > unicode_file
To unicode conversion is correct for me.
2. ./nsconv -f UTF-8 -t gb18030 unicode_file > gb18030_file_reverse
However, unicode to gb18030 generates blank.
Assignee | ||
Comment 1•23 years ago
|
||
It looks like the 4byte range encode does not work.
in intl/uconv/ucvcn/nsUnicodeToGBK.cpp both
204 PRBool nsUnicodeToGBK::TryExtensionEncoder(
and
223 PRBool nsUnicodeToGBK::Try4BytesEncoder(
217 if(NS_SUCCEEDED(res))
is true but *aOutLen == 0
we should change it to
if(NS_SUCCEEDED(res) && (*aOutLen > 0))
Summary: GB18030 encoder issues. → GB18030 encoder issues.
Assignee | ||
Comment 2•23 years ago
|
||
should have fix in hours. mark it as moz0.9.1
Target Milestone: --- → mozilla0.9.1
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Whiteboard: fix wait for peer review
Assignee | ||
Comment 4•23 years ago
|
||
spin off the real issue into 81500
the fix here is a safe work around which only impact this converter. It is much
safer than
Assignee | ||
Comment 5•23 years ago
|
||
r=bstell
Status: NEW → ASSIGNED
Whiteboard: fix wait for peer review → patch ready. need sr
Assignee | ||
Comment 7•23 years ago
|
||
fixed and check in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 8•23 years ago
|
||
Changing QA contact to teruko for now. Please let ftang now in case you need
more information to verify this bug.
QA Contact: andreasb → teruko
verified in nightly 2001051622 on Solaris,
All the GB18030 characters can display OK, but all the English characters are
disappeared.
I will attach the test text and the sanpshot image.
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Assignee | ||
Comment 12•23 years ago
|
||
I never receive a gb18030.2000-0 font from sun. I only received gb18030.2000-1
font from sun. Does gb18030.2000-0 font have ASCII in it ? Can you mail me that
font? Please reopen a new bug for the ascii issue. That sonunds a different
issue than this bug. Let's not recycle it.
Comment 13•23 years ago
|
||
Actually, gb18030.2000-0 font just is the GBK font, and it has the ASCII in it.
I will attached the fonts.alias file defined for GB18030 on Solaris, you will
see how the GB18030 font be defined.
I will also file a new bug for this problem.
Comment 14•23 years ago
|
||
Assignee | ||
Comment 15•23 years ago
|
||
I need the actual font to look at it. or a screen shot of "xfd -fn " + your font
will help.
Comment 16•23 years ago
|
||
From file font.alias, we can see gb18030-0 use gbksong-medium fonts.
-sun-song-bold-r-normal--14-120-75-75-c-120-gb18030.2000-0 gbksong-medium12
-sun-song-bold-r-normal--16-140-75-75-c-140-gb18030.2000-0 gbksong-medium14
-sun-song-bold-r-normal--18-160-75-75-c-160-gb18030.2000-0 gbksong-medium16
-sun-song-bold-r-normal--22-200-75-75-c-200-gb18030.2000-0 gbksong-medium20
-sun-song-bold-r-normal--26-240-75-75-c-240-gb18030.2000-0 gbksong-medium24
gbksong-medium fonts can be got from Solaris system:
/usr/openwin/lib/locale/zh.GBK/X11/fonts/75dpi
gbksong-medium fonts contain ASCII font.
I will attached a snapshot image to show the ASCII font in gbksong-medium16 by
command "xfd -fn gbksong-medium16"
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
Ervin,
please send whole files as tgz format to Frank directly.
It is too difficult to understand what's problem and how to set up here.
You should gather Solaris fonts, configure fonts.dir and fonts.alias in
one place so that Frank can use it easily like,
mkdir gbfont
cd gbfont
gzip -dc gbfonts.tgz | tar xvf -
xset +fp `pwd`
gbfonts.tgz should contain gb18030.2000-0 and gb18030.2000-1,and
proper fonts.dir and fonts.alias.
Comment 19•23 years ago
|
||
Change byuan@eng.sun.com to brian.yuan@sun.com
Comment 20•23 years ago
|
||
Sorry for the confusion, but Solaris doesn't use the CJK fonts to display ASCII
characters, in zh.GBK locale, we use the song-roman?? fonts for ASCII
characters, you can see the /usr/openwin/lib/locale/zh.GBK/X11/fonts/75dpi for
more detailed information.
Brian.Yuan@Sun.COM
Assignee | ||
Comment 21•23 years ago
|
||
can some one verify my fix in the latest bulid? Is that fixed or not?
reopen it if it is still a problem with the build after 5/17
Comment 22•23 years ago
|
||
can I get a copy of the fonts also?
Comment 23•23 years ago
|
||
I've verified your fix by running nsconv (the original problem).
Assignee | ||
Comment 24•23 years ago
|
||
I need verification from sun about the ascii display problem.
Comment 25•23 years ago
|
||
In latest nightly: ASCII characters can display OK now. but:
Two 4-byte GB18030 characters displayed error:
Characters "0x82358738" display as '?', though it have font glyph.
Characters "0x82358739" display as '?', though it have no font glyph.
I filed a new bug for the new problem.see bug 82666.
Comment 26•23 years ago
|
||
Since we do not have fonts for Mac and Windows, I change QA contact to the
reporter.
QA Contact: teruko → ftang
You need to log in
before you can comment on or make changes to this bug.
Description
•