Bug 61948

Summary: couldn't print gb18030, couldn't open files in zh_CN.GB2312
Product: [Retired] Red Hat Linux Reporter: Yu Shao <yshao>
Component: geditAssignee: Havoc Pennington <hp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: eng-asia-list, otaylor
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-29 10:55:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 61901    
Attachments:
Description Flags
I updated a patch. please use this instead of current gedit-0.9.4-print.patch
none
we need this patch yet. as I said, this is same patch which is already filed to bugzilla.gnome.org
none
and this. oh, no. 0.9.7 doesn't contain gettextize.... none

Description Yu Shao 2002-03-26 05:34:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901

Description of problem:
Couldn't open files under zh_CN.GB2312 locale
Couldn't print GB18030 test files under zh_CN.GB18030 locale

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Set locale as zh_CN.GB2312 or zh_CN.GB18030
2.use gedit open gb18030 test files from:
 http://intranet.corp.redhat.com/ic/intranet/EngAsiaEngineeringSC.html

	

Expected Results:  should be able to open and print

Additional info:

Comment 1 Akira TAGOH 2002-03-26 09:50:31 UTC
Created attachment 50425 [details]
I updated a patch. please use this instead of current gedit-0.9.4-print.patch

Comment 2 Akira TAGOH 2002-03-26 09:59:34 UTC
I tried to open http://junk.brisbane.redhat.com/gb18030/double1.txt with gedit.
this file contains invalid characters with gb2312.
for example:
iconv -f gb18030 -t utf-8 double1.txt > double1.txt.utf8
iconv -f utf-8 -t gb2312 double1.txt.utf8 > double1.txt.gb2312

converting from UTF-8 to gb2312 was failed.
a reason which gedit can't open will relates this, I think.


Comment 3 Havoc Pennington 2002-03-26 21:24:29 UTC
If I change the gedit font to "fangsong ti" in GB2312 encoding, then
it seems to handle double1.txt basically OK, except that the text widget 
doesn't redraw correctly. Force it to repaint by dragging another window over it
and the test file looks correct.

Has upstream seen the printing patch? What did they think?

Comment 4 Yu Shao 2002-03-27 05:41:11 UTC
printing:

double1.txt: only about 10% of the characters are shown in print preview
double2.txt: the first time I opened it and previewed ok, I killed printing 
             after 30 mins no response.
             preview now becomes blank

all other test files' preview are blank.


Comment 5 Yu Shao 2002-03-27 05:49:54 UTC
Can we automatically create fontset for gedit according to different locales? I
remember llch had a patch for 7.2-tcsc, now we have to manually edit
~/.gnome/gedit's font part.

Comment 6 Leon Ho 2002-03-27 07:49:07 UTC
Yes. Can be customized by gettext. Havoc, is it possible to add the following?

===================================================================
RCS file: src/prefs.c,v
retrieving revision 1.1
diff -r1.1 src/prefs.c
44c44
< #define DEFAULT_FONTSET "-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*,*"
---
> #define DEFAULT_FONTSET _("-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*,*")



and "-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*,*" to following for po files.
zh_CN.GB18030.po
"-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,-misc-zysong18030-medium-r-normal-*-*-160-*-*-p-*-gb2312.1980-0,-misc-zysong18030_z13-medium-r-normal-*-*-160-*-*-c-*-iso10646-1"

zh_CN.GB2312.po
"-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"

zh_TW.Big5.po
"-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,-taipei-*-medium-r-normal--*-*-*-*-*-*-big5-0,-*-*-medium-r-normal--16-*-*-*-*-*-big5-0,*-r-*"

ko_KR.eucKR
"-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,-*-gulim-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,-*-*-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,*"


Comment 7 Akira TAGOH 2002-03-27 07:56:31 UTC
gedit-0.9.4-print.patch is no longer needed for the latest gedit. our gedit was
released when gnome-print didn't fully supports UTF-8 yet. the latest gedit
works fine without this patch. but other patch will be needed though (we have
already that patch, and filed to bugzilla.gnome.org)

Comment 8 Nakai 2002-03-27 08:05:25 UTC
That DEFAULT_FONTSET gettextized patch is already commited into gedit 0.9.6
Good reason for gedit update in Hampton.

Comment 9 Nakai 2002-03-27 08:09:19 UTC
*** Bug 61959 has been marked as a duplicate of this bug. ***

Comment 10 Akira TAGOH 2002-03-27 08:21:52 UTC
We have already frozen the features...

Comment 11 Nakai 2002-03-27 08:27:19 UTC
This is a SHOULD-FIX bug, I'm not saying 'The newer, the better'.

Comment 12 Paul Gampe 2002-03-27 09:14:10 UTC
Shao is looking at gedit as one of the applications we will use for the PRC GB18030 compliance test.  We must pass the test to have a legal product for 
China, so I would consider this a MUST-FIX. Printing the test files Shao has is one of the tests.



Comment 13 Havoc Pennington 2002-03-27 17:03:19 UTC
I'm having to remove all our current CJK patches on 0.9.7 upgrade due to
conflicts - so if there was anything in there that you didn't get upstream, it
is now not in there. You may want to double-check.

Anyway, building 0.9.7 now.

Comment 14 Akira TAGOH 2002-03-28 06:23:12 UTC
Created attachment 51084 [details]
we need this patch yet. as I said, this is same patch which is already filed to bugzilla.gnome.org

Comment 15 Akira TAGOH 2002-03-28 06:25:17 UTC
Created attachment 51085 [details]
and this. oh, no. 0.9.7 doesn't contain gettextize....

Comment 16 Akira TAGOH 2002-03-28 06:26:32 UTC
So that I reopen this bug.

Comment 17 Havoc Pennington 2002-03-28 21:07:10 UTC
0.9.7-2 contains these fixes.

Comment 18 Akira TAGOH 2002-03-29 08:40:53 UTC
It seems like 0.9.7-2 doesn't have gettextize patch...

Comment 19 Nakai 2002-03-29 10:14:26 UTC
Oops, it's saying that's available in upcoming 0.9.8 release.. Sorry.

http://bugzilla.gnome.org/show_bug.cgi?id=57010

Comment 20 Havoc Pennington 2002-03-29 15:02:34 UTC
We aren't going to upgrade to 0.9.8, though. The version freeze was two weeks ago.

0.9.7-3 contains the gettext patch.