After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 78007 - i18n input methods, font selection, display all broken
i18n input methods, font selection, display all broken
Product: libzvt
Classification: Deprecated
Component: internationalization
Other All
: Urgent major
: ---
Assigned To: Hidetoshi Tajima
Luis Villa
: 75487 75814 80311 82138 84838 85469 85960 85986 86134 87064 89034 90405 90557 97109 (view as bug list)
Depends on: 73964 79852 82165 83400 83412 83725 83738 83741 88029 90816 90818 90820 90840
Blocks: 83076
Reported: 2002-04-08 04:48 UTC by Xavier Cho
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---

temp patch for text input and display (7.62 KB, patch)
2002-05-21 00:50 UTC, Hidetoshi Tajima
none Details | Review
2nd patch for i18n text input/output and cut & paste (14.03 KB, patch)
2002-05-22 18:30 UTC, Hidetoshi Tajima
none Details | Review
giFTcurs screenshot (19.18 KB, image/png)
2002-07-13 16:39 UTC, José Fonseca
Patch of profterm to use pango fonts in Zvt (1.33 KB, patch)
2002-07-29 21:53 UTC, Hidetoshi Tajima
none Details | Review
i18n patch merged into the HEAD (73.59 KB, patch)
2002-11-13 21:30 UTC, Hidetoshi Tajima
none Details | Review

Description Xavier Cho 2002-04-08 04:48:16 UTC
The gnome-terminal neither displays Korean characters 
properly, nor accepts them by X input method(XIM).

With the previous versions of gnome 1.4, I can input 
Korean characters but they're garbled regardless of 
font settings.

It has been fixed since the recent red-carpet update, 
but the problem revived with gnome 2.0.

I'm using ami as my input method application.

Could you please help me with this problem? Thanks.
Comment 1 Xavier Cho 2002-04-14 09:05:27 UTC
When I open another terminal from gnome-terminal, it shows 
following error message.

The font "-sony-fixed-medium-r-normal-*-16-*-*-*-c-*-iso8859-1" does 
not support all the required character sets for the current 
locale "ko_KR.eucKR"(Missing character set "KSC5601.1987-0")

If I select a Korean font in my terminal profile, terminal 
window expands with garbled texts and displays below message.

The font "-baekmuk-batangbdf-medium-r-normal-*-16-*-*-*-m-*-
ksc5601.1987-0" does not support all the required character sets for 
the current locale "ko_KR.eucKR"(Missing character set "ISO8859-1")

I hope this could help tracking down the problem.

Korean GNOME Community -
Comment 2 Havoc Pennington 2002-04-14 13:43:27 UTC
To get rid of those errors you would need to enter a fontset name 
(I guess a font name that matched multiple fonts, for each encoding),
and gnome-terminal needs to provide a way to do so.

However, libzvt is broken anyway and doesn't support input methods 
or double-width chars, so even with that gnome-terminal feature 
it isn't going to work. libzvt needs to be repaired.
Comment 3 Havoc Pennington 2002-05-02 01:54:57 UTC
libzvt needs fixing before I can do much.

You can try vte instead of zvt if you want, use "vte" module from 
CVS then build gnome-terminal with "configure --with-widget=vte". It's 
pretty broken in other ways though. ;-)
Comment 4 Hidetoshi Tajima 2002-05-20 19:37:53 UTC
*** Bug 82138 has been marked as a duplicate of this bug. ***
Comment 5 Hidetoshi Tajima 2002-05-21 00:50:04 UTC
Created attachment 8611 [details] [review]
temp patch for text input and display
Comment 6 Hidetoshi Tajima 2002-05-21 01:24:40 UTC
The patch above is by all means temporary, but at least
input methods and text display should start working. 
(I just attached it to ask if I'm doing a right thing or

I just did:
 - add GtkMultiContextIM(based on the patch in #75814)
 - use XwcDraw to XmbDraw - as the code assumed 
   wchar_t is the same as UTF-32 - this is not right.
I'll continue to work on it, to do:
 - fix cursor location when XFontSet is used
 - implement preedit-changed callback for XIM

BTW, I wonder - is pango support put in libzvt and 
profterm anytime soon? If so, I'm afraid fixing the
libzvt code for the XFontSet support may become
duplicate work.

Comment 7 Luis Villa 2002-05-21 21:59:32 UTC
Marking this high to make sun/wipro aware of the issue, but I'm not
sure that this is fixable right now so punting out to community 2.0.x.
[Maybe 2.2?]
Comment 8 Hidetoshi Tajima 2002-05-22 18:30:24 UTC
Created attachment 8664 [details] [review]
2nd patch for i18n text input/output and cut & paste
Comment 9 Hidetoshi Tajima 2002-05-22 19:07:36 UTC
made the 2nd patch - I appreciate if anyone here review
it and give me suggestions before I go too far wrong.

The patch should make gnome-terminal with libzvt work
better in text input and display, as well as
cut and paste from/to other apps(or within the

You have to edit a profile and pick up a proper font
for making sure XFontSet can be created for the locale.

The 3rd patch will follow shortly - which will do:
 - preedit change callback implementation
 - input method selection popup or some other way to
   select input method.
Comment 10 jacob berkman 2002-05-22 19:17:19 UTC
what env vars. etc. do i need to set to see it working?
Comment 11 Hidetoshi Tajima 2002-05-22 19:35:52 UTC
setenv LC_ALL or LANG to the name of a multibyte locale.
If you have ja_JP.eucJP in a redhat box, then

 % env LC_ALL=ja_JP.eucJP gnome-terminal

For testing text display, run 'date', 'ls -l', or such
commands localized for the locale. Make sure to pick up a
font to display Japanese characters with XFontSet.
(Finding out the font was tough..)

In my local Solaris8 box, I tested in en_US, fr, de, ru,
ja_JP.eucJP, ja_JP.PCK(Japanese Shift JIS), zh_CN.GBK, 
and many UTF-8 locales.

Comment 12 Luis Villa 2002-05-26 14:14:43 UTC
As pointed out in bug 75814, this should be a showstopper, so I'm
marking up the severity. Also marking 75814 a duplicate of this.
Comment 13 Luis Villa 2002-05-26 14:15:37 UTC
*** Bug 75814 has been marked as a duplicate of this bug. ***
Comment 14 jacob berkman 2002-05-28 22:37:45 UTC
i committed it w/o really testing - we'll see what happens.

if more stuff is needed, please reopen.

2002-05-28  jacob berkman  <>

	* may as well do 1.116.0 while we're at it

	* libzvt/libzvt.h:
	* libzvt/update.c:
	* libzvt/vt.c:
	* libzvt/zvtterm.c: i18n patch from Hidetoshi Tajima
	<> to make i18n work.  hopefully it
	doesn't break everything.

	fixes #78007
Comment 15 Hidetoshi Tajima 2002-05-28 23:50:42 UTC
reopening it, as I'm pretty sure there are more to
be fixed under this.
 - preedit changed callback implementation
 - input method selection menu
 - PRIMARY selection with multi-byte characters
   (text should be selected at character boundary
    rather than byte boundary).
 - etc...
Comment 16 Luis Villa 2002-05-29 04:34:13 UTC
*** Bug 80311 has been marked as a duplicate of this bug. ***
Comment 17 Luis Villa 2002-05-29 04:35:46 UTC
Hidetoshi: I might suggest that you file separate bugs for each of
those issues, and make this bug depend on those. Also, if we've fixed
the biggest of the issues, would you agree that is is OK to punt this
to 2.0.1 now?
Comment 18 Gustavo Giráldez 2002-05-29 04:36:36 UTC
Unfortunately the patch breaks stuff (at least, I think it must be the
patch): colors and bold attribute are no longer shown; arrow keys
don't work in console apps (e.g. less, vi); and updating is pretty
broken (in bash for example Ctrl-D deletes the characters but it's not
reflected in the widget, and deleting a line in vi doesn't show the
line deleted).

Just made a wild guess, and the change to file vt.c is the one causing
all these problems.  That code doesn't look right, since it's
stripping out information from the parsed character thus breaking the
 state machine.  Hidetoshi?
Comment 19 Gustavo Giráldez 2002-05-29 04:44:29 UTC
Ahem... it's stripping nothing out :-), but still "information" about
the character is lost if it's greater than or equal to 0x80.
Comment 20 Hidetoshi Tajima 2002-05-29 05:25:15 UTC
ah - if (c < 80) should be if (c < 0x80) in vt.c at least.
my fault - I'll commit this right away.
Comment 21 Gustavo Giráldez 2002-05-29 05:40:28 UTC
Works great now, at least as far as I tested it.
Comment 22 Hidetoshi Tajima 2002-05-29 06:02:42 UTC
Luis: I think all of the three issues I listed above are
important enough to support multibyte locales and they are
all to be fixed in 2.0.0 IMO, so I'd rather keep using
working on this bugzilla. With a few more weeks, I wish
things will be in better shape than now.

BTW, how soon will 2.0.1 be released after 2.0.0?

Comment 23 Luis Villa 2002-05-30 12:46:24 UTC
Hidetoshi: if you can promise they'll be fixed in 2.0.0, that's great-
but we can't ship a badly broken terminal that doesn't work for anyone
in 2.0.0. If that is the case, we'll have to revert the i18n stuff
before 2.0.0 is released. The plan for 2.0.1 is 4-8 weeks after 2.0.0,
so not that long.
Comment 24 Ross Burton 2002-05-30 13:06:58 UTC
I have filed a new bug, 83528, about weird line spacing and redraw
behaviour.  Not sure if that is related to this...
Comment 25 Hidetoshi Tajima 2002-05-30 16:45:14 UTC
Loiue: libzvt is still broken in multi-byte locales but 
it were more broken before the code change anyway, and
in single locales, the code change shouldn't have any
impact. If there is, I'd like to look into before reverting
the change at all.

I'm not sure if #83528 is releted to this, either.
Reverting the change will remove the weird line spacing??
Comment 26 Luis Villa 2002-05-31 02:15:27 UTC
A whole lot of changes just came in to what had been a fairly stable
zvt, and AFAIK this is the only patch that has gone in. So... I don't
know where else to point fingers. Jacob, any thoughts?
Comment 27 jacob berkman 2002-06-03 17:14:50 UTC
i've reverted the changes on HEAD, and have created a branch
(libzvt-i18n) where the changes still exist.

Hidetoshi, feel free to commit / work on the libzvt-i18n branch.
Comment 28 Hidetoshi Tajima 2002-06-03 18:43:40 UTC
How's vte nowadays? In terms of I18N features, vte looks much
attractive as it already has pango, gtk's input methods and
utf8 text handling at least in source code level.

I wonder if it's worthwhile to work on zvt i18n - if people don't
have much interest in it but plan to move on vte in near future.
Comment 29 Wayne Schuller 2002-06-04 05:30:49 UTC
this is not the kind of discussion we need to have 7 days before a
Comment 30 Hidetoshi Tajima 2002-06-04 06:25:41 UTC
Well, above all, this kind of bug should not exist 7 days before...

Anyway, sorry for the comment above - let me continue to work on 
libzvt-i18n branch - but I'll be giving up 2.0.0 and targetting 
2.0.1 which is 4-8 weeks after.

Luis, Jacob - is it okay?
Comment 31 Luis Villa 2002-06-04 15:12:38 UTC
Hidetoshi: yes, I think targeting 2.0.1 would be great. Ideally,
though, I'd like to see the patch back in (ideally with fixes for bugs
83400, 83412, 83725, and 83741) ASAP after 2.0.0- if we're going to
effect this type of /huge/ change, it needs to be tested as long as
possible, not put in at an extremely late date before 2.0.1, so the
sooner it gets into CVS after 2.0.0 the better.

You may also want to look at/audit the patches posted by Cristiano De
Michele to he may be a bit further along
than you on some of these issues and you may benefit from collaboration.
Comment 32 José Fonseca 2002-06-09 12:22:28 UTC
I have a problem in this category with gnome-terminal-1.9.7 and

gnome-terminal doesn't interpret sticky keys such as 'a -> á and so
on.  It's the only X application where this happens - xterm and all
other gnome applications don't have this problem.

I don't have any special locale configured, just the "pt" XkbLayout in

I also wanted to note that in a previous gnome-terminal version (a
week ago) I had I also experienced problem displaying these kind of
characters, but as I update my Gentoo system quite often, that problem
got away with an update before I could fill a bug.
Comment 33 Gaute Lindkvist 2002-06-11 08:52:47 UTC
Has it been tested that bug 83741 works with the changes reverted?
Comment 34 Samuel Stringham 2002-06-11 14:51:21 UTC
*** Bug 84838 has been marked as a duplicate of this bug. ***
Comment 35 Luis Villa 2002-06-25 19:37:49 UTC
*** Bug 85960 has been marked as a duplicate of this bug. ***
Comment 36 Luis Villa 2002-06-25 19:37:56 UTC
*** Bug 85469 has been marked as a duplicate of this bug. ***
Comment 37 Luis Villa 2002-06-26 03:10:52 UTC
*** Bug 85986 has been marked as a duplicate of this bug. ***
Comment 38 Hidetoshi Tajima 2002-06-28 23:27:54 UTC
commit to libzvt-i18n branch for fixing i18n 
stuff: pango, input methods, selection, and 
Unicode line buffer handing.

 - Font selection in preference needs to change 
   for selecting pango fonts instead of x_font.
 - preedit draw should wrap to next line
 - handling irregal characters

Comment 39 Luis Villa 2002-07-01 18:41:54 UTC
Hidetoshi: Great! thanks. I'll see what I can do about getting this
Comment 40 Luis Villa 2002-07-02 03:59:45 UTC
*** Bug 86134 has been marked as a duplicate of this bug. ***
Comment 41 Tuomas Kuosmanen 2002-07-03 11:23:17 UTC
Yeah, the branch makes i18n pasting work.

Like pointed above the font stuff is weird, it uses a variable width
default font for me, and obviously the preferences font selector
doesnt help until the pango font thing mentioned above gets fixed.

I love the antialiasing though :-)
Comment 42 Luis Villa 2002-07-08 20:02:08 UTC
the branch added AA? Eh? Um, not that I'm against AA or anything, but
shouldn't that be a separate patch/issue/etc?

Tuomas: any stability issues?

Jacob: any word on getting the branch into snaps for testing purposes?
Comment 43 jacob berkman 2002-07-08 20:03:48 UTC
there's no word - nobody said i should use this branch.

should i?
Comment 44 Luis Villa 2002-07-08 22:16:41 UTC
Oops, yeah, I meant to send you an email about this last week. If you
could, please make the snaps build from this branch and send
gnome2-snaps an email about it when you do. Thanks.
Comment 45 Hidetoshi Tajima 2002-07-09 03:23:08 UTC
luis: what's gnome2-snaps email?
Comment 46 Luis Villa 2002-07-09 03:54:19 UTC
hidetoshi: I'd suggest letting Jacob
handle the announce once it is in the builds.
Comment 47 jacob berkman 2002-07-09 14:31:54 UTC
ok, linux tinderboxen are switched over after i merged stuff down from

from looking at the diff, the SUN_I18N stuff is going to have to come
out before it gets merged to HEAD, and i am not sure that we want to
break bin compat (but didn't really check if it was truly broken or not)

so we'll see what breaks...
Comment 48 Luis Villa 2002-07-12 14:42:20 UTC
Can everyone here test the patch in it's current form, esp. those of
you who reported the original crasher bugs? There is apparently also a
report that fonts cannot be set now using this patch; please test
that. Thanks! [And thanks, hidetoshi, for taking this one on.]
Comment 49 José Fonseca 2002-07-13 16:32:12 UTC
Ok. I've checked out the libzvt-i18n branch, built it and rebuilt gnome-terminal too. Here is the things that I could gather so far:

 - a strange different font appears and the font selection dialog doesn't seem to have any effect
 - typing, copying and pasting "су..." characters works without problems
 - bold doesn't work
 - underline is actually over "overline", i.e., the line is draw above the characters and not below
 - at least one ncurses application isn't displayed correctly (giFTcurs - I'll provide a screenshot shortly)
 - but other work without problems so far (mutt, vim, lynx, w3m)
 - gnome-terminal appears to be more slow rendering (I can notice the screen terminal window be updated when scroolling on mutt, or w3m)
 - gnome-terminal crashes frequently when pressing Control-C while scrolling fast (e.g. doing 'ls -lR'). Here is the backtrace:

        Backtrace was generated from '/usr/bin/gnome-terminal'

        0x40c02639 in wait4 () from /lib/
        #0  0x40c02639 in wait4 () from /lib/
        #1  0x40c867f8 in sys_sigabbrev () from /lib/
        #2  0x40ae40f3 in waitpid () from /lib/
        #3  0x401c1545 in libgnomeui_segv_handle (signum=-512) at gnome-ui-init.c:620
        #4  0x40ae1e3b in raise () from /lib/
        #5  0x40b8b778 in sigaction () from /lib/
        #6  0x40bd2ce1 in free () from /lib/
        #7  0x40b1bc64 in g_free (mem=0xfffffe00) at gmem.c:187
        #8  0x4007e033 in zvt_term_readdata (source=0x81aaf18, condition=G_IO_IN, data=0x80ee340) at zvtterm.c:3322
        #9  0x40b3b58f in g_io_unix_dispatch (source=0x81aaf60, callback=0x4007dd40 <zvt_term_readdata>, user_data=0xfffffe00) at giounix.c:158
        #10 0x40b16e95 in g_main_dispatch (context=0x8097f18) at gmain.c:1617
        #11 0x40b1770b in g_main_context_iterate (context=0x8097f18, block=1, dispatch=1, self=0x809c4b8) at gmain.c:2161
        #12 0x40b135bf in g_main_loop_run (loop=0x8187a68) at gmain.c:2462
        #13 0x404b795e in gtk_main () at gtkmain.c:936
        #14 0x0805806b in main (argc=1, argv=0xbffff9c4) at terminal.c:1167
        #15 0x40b79142 in __libc_start_main () from /lib/

...and this is it so far.

Although this comment is full of complaints, I must say I'm pretty happy for this issue being addressed, and express my gratitude for the excelent work that you all have been doing! Thanks.
Comment 50 José Fonseca 2002-07-13 16:39:23 UTC
Created attachment 9842 [details]
giFTcurs screenshot
Comment 51 José Fonseca 2002-07-13 16:46:39 UTC
Just another comment about the giFTcurs thing: the problem seems to be
with the upper-right-corner character:


or something that is sent at the beginning of each window, because if
I force the refresh of the areas that weren't draw (by moving a window
over that area), all characters appear correctly from behind, except
the above character which stays with the background color.

I hope this helps. If anybody wants a further snapshots showing this
just say it.
Comment 52 Luis Villa 2002-07-15 02:18:17 UTC
Yeah. Fonts are completely broken, AFAICT. That's Not Cool. Any idea
what the problem is there, Hidetoshi?
Comment 53 Hidetoshi Tajima 2002-07-19 19:00:16 UTC
Yes, fonts are broken. libzvt has to get font
preference for pango font like "monospace 14",
instead of x-font like "fixed". I think it needs 
change in gnome-terminal code change for profile.
Comment 54 Ben FrantzDale 2002-07-25 18:17:26 UTC
*** Bug 89034 has been marked as a duplicate of this bug. ***
Comment 55 Alejandro Martinez 2002-07-26 10:55:52 UTC
I've updated gnome2 to 20020724... developer snapshot, and now
gnome-terminal selects pango fonts properly (I think).

The bad thing is I can't see other xfs fonts available (eg. additional
truetype fonts), just pango fonts. Maybe, I'm missing some pango
config (?)

No matter the font I choose, the space between lines is quite ugly. 
Comment 56 Luis Villa 2002-07-29 14:19:07 UTC
20020724 now uses vte, since the zvt font fixes were not forthcoming.
Comment 57 Hidetoshi Tajima 2002-07-29 21:51:40 UTC
I've commited the Zvt side code change for font

Together with the profterm side change, which
I'll attach after this comment, gnome-terminal can
select Pango fonts instead of x fonts on its 

What's the next step? Can someone help code review
to merge libzvt-i18n stuffs into the stable branch
and the HEAD?
Comment 58 Hidetoshi Tajima 2002-07-29 21:53:28 UTC
Created attachment 10115 [details] [review]
Patch of profterm  to use pango fonts in Zvt
Comment 59 jacob berkman 2002-07-30 13:25:43 UTC
i'd rather have it get some user testing before bothering with code
review, as there's no point in reviewing code that doesn't work.

however i don't really feel comfortable dumping it on all of our
snapshot users.  i can spin some packages and let people use them if
they want.  you might also want to post to some mailing lists asking
if people can try out your branch (gnome-i18n *might* be a decent list)
Comment 60 Hidetoshi Tajima 2002-08-02 02:57:17 UTC
I'll post email to gnome-i18n, gtk-i18n and desktop-devel-list to call
for testers.
Comment 61 Luis Villa 2002-08-12 18:02:48 UTC
*** Bug 90405 has been marked as a duplicate of this bug. ***
Comment 62 Hidetoshi Tajima 2002-08-13 04:02:53 UTC
I18n input methods, font selection and display are 
all working on Today's libzvt-i18n branch -
with id=10115 patch applied to profterm of the HEAD
or of gnome-2-0 branch.

Marking this "NEEDINFO" for now - and will mark "FIXED" it in a week
from today if there is no objection.
Comment 63 Frederic Crozat 2002-08-13 08:01:51 UTC
For the record, Mandrake cooker has switched to i18n branch of zvt +
the profterm patch and there is still some issues (all using latin1
locales such as fr_FR or en) :
-bad drawing when the last line of the terminal is scrolled up (one or
two pixels on the bottom of the line are not scrolled up and the rest
of the line scrolled is truncated..)

-when using Monospace font class, even when you change the font size,
font glyph size is not changed, only the space around the glyph is
Comment 64 Luis Villa 2002-08-13 14:04:58 UTC
*** Bug 90557 has been marked as a duplicate of this bug. ***
Comment 65 Luis Villa 2002-08-15 00:57:17 UTC
fcrozat: can you document/file all the issues your users are seeing
with that branch? it would be much appreciated.

In the meantime, I'm going to reopen on fredric's word, but...
obviously, we'll close if he doesn't come up with some actual reported
bugs :) 
Comment 66 Frederic Crozat 2002-08-15 09:03:15 UTC
Done, I've added bugs #90816, #90818 and #90820 as dependencies of
this bug.
Comment 67 Luis Villa 2002-08-19 21:12:49 UTC
*** Bug 85052 has been marked as a duplicate of this bug. ***
Comment 68 Hidetoshi Tajima 2002-08-19 21:43:19 UTC
commit fix for 90816 and 90818.	

* libzvt/zvti18n.c (zvt_term_get_xfontset_internal): get font ascent
from XFontSet instead of pango metrics(Fixed #90816, #90818).
Comment 69 Hidetoshi Tajima 2002-10-11 05:37:09 UTC
*** Bug 75487 has been marked as a duplicate of this bug. ***
Comment 70 Hidetoshi Tajima 2002-10-16 06:23:55 UTC
I forgot where I asked this question last time,
so will ask here again.

I'd like to merge the libzvt-i18n changes to the HEAD.
If any objection, please comment by end of the week.
Comment 71 Stanislav Brabec 2002-10-16 09:44:05 UTC
I have tested a lot the i18n branch.
Basic functions of i18n branch are working - include clipboard.
Only rejects clipboard, if it contains characters outside terminal's

But I am not able properly select my favorite font. It autochooses
different font, when I am using ISO-8859-2 resp. UTF-8 and it doesn't
use bold font. (tested 2002-10-09)
Comment 72 Hidetoshi Tajima 2002-10-18 06:15:40 UTC
moving i18n related bugs to internationalization component.

This bug will be resolved by merging libzvt-i18n to the
HEAD, and applying a gnome-terminal patch to enable
pango fonts for Zvt.
Comment 73 Elijah Newren 2002-10-31 00:53:38 UTC
*** Bug 87064 has been marked as a duplicate of this bug. ***
Comment 74 Hidetoshi Tajima 2002-10-31 02:26:42 UTC
*** Bug 97109 has been marked as a duplicate of this bug. ***
Comment 75 Hidetoshi Tajima 2002-11-13 21:30:43 UTC
Created attachment 12292 [details] [review]
i18n patch merged into the HEAD
Comment 76 Hidetoshi Tajima 2002-11-13 21:32:05 UTC
merged libzvt-i18n to the HEAD.