Closed Bug 81200 Opened 23 years ago Closed 23 years ago

GB18030 encoder issues.

Categories

(Core :: Internationalization, defect)

x86
Windows NT
defect
Not set
normal

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.
Blocks: 72525
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.
should have fix in hours. mark it as moz0.9.1
Target Milestone: --- → mozilla0.9.1
Attached patch fix (deleted) — Splinter Review
Whiteboard: fix wait for peer review
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
r=bstell
Status: NEW → ASSIGNED
Whiteboard: fix wait for peer review → patch ready. need sr
fixed and check in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
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.
Attached file All GB18030 characters (deleted) —
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.
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.
I need the actual font to look at it. or a screen shot of "xfd -fn " + your font will help.
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"
Attached image ASCII page in gb18030-0 font (deleted) —
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.
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
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
can I get a copy of the fonts also?
I've verified your fix by running nsconv (the original problem).
I need verification from sun about the ascii display problem.
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.
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.

Attachment

General

Creator:
Created:
Updated:
Size: