This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: About Insight's GUI , please help me ~


On Wed, 2004-02-04 at 17:11, Feng Li wrote:
>    Thanks a lot for your help, and I have one more question, that is
> how can I show wide characters (EUC,GB2312,not UTF8)in the Insight
> source view? The source view can show UTF8 codes, but can not show
> EUC(GB2312,BIG5,etc.), how to let the source view to show
> EUC(GB2312,BIG5,etc.), which file I will modify? This is my first time
> to use Linux and Insight, maybe my question is a little laughably,
> please understand me, thanks.

My experience with mulit-byte character fonts with Tk is pretty limited,
but I am certain that Tk can handle it. As I recall, we had a version of
SourceNavigator that ran in Japanese, so it must be possible.

Ultimately, you are attempting to get a Tk text widget to fill with a
multi-byte font. I believe that all you need to do is choose an
appropriate font and stuff content into the widget. For more information
on Tk, go to www.tcl.tk.

You will have to modify two things:

- global/fixed: This is the default font. It is defined in
src/libgui/library/looknfeel.tcl. This is the default font used by all
the widgets in insight. You should be able to set it to a standard
system font by adding/changing default font values in
src/gdb/gdbtk/library/prefs.tcl.

- modify gdb_loadfile in src/gdb/gdbtk/generic/gdbtk-cmds.c to handle
multi-byte characters

You _may_ also have to modify gdb to do this, since insight relies on
gdb's line tables in the symbol table for source window content. (See
gdb_loadfile for more on this.)

I think this should be enough to get the source window to display
multi-byte characters, but I wouldn't bet on it. Like I said, my
experience with internationalization of Tk applications is very limited.

Keith



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]