[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re[2]: cut and paste for chinese in x window system



>>>>> "hashao" == hashao  <hashao@telebot.com> writes:

(hashao) From Xlib - C language X interface, 16.6:
(hashao) === Quote === Cut buffers are implemented as properties on
(hashao) the first root window of the display. The buffers can only
(hashao) contain text, in the STRING encoding. The text encoding is
(hashao) not changed by Xlib when fetching or storing. Eight buffers
(hashao) are provided ===End Quote==

(hashao) It said no change on STRING.

oh, i see. thanks. ;)

I got a question here. i wrote a plain gb2312 text file, which can
be shown in Crxvt-gb. then i load it (C-x C-f) into xemacs, then,
(!!) it is shown correctly. Then i load this file

$ most gb2312.file

into Crxvt-gb, then I cut-n-paste it through mouse into xemacs window,
then it is shown in (!!) garbage.

I think this is as following, the when i C-x C-f loading this file,
xemacs recognize this file is in gb2312 encoding, then xemacs
transformed it into its inner encoding, then show it in a gb2312 fonts,
then ok. in the later case, though nobody, ;) changed the STRING 
encoding as in gb2312, while after it's paste into xemacs window,
xemacs do _no_ tranforming for its encoding into xemacs' inner
encoding, then xemacs will show it in its default iso-8859-? font,
then garbage?

is this right?

then i see two possible solutions here for this special case, ;)

1) let xemacs' default font be a gb2312 font, but this really is so
silly, and most possibly will cause lota problems elsewhere.

2) we make a daemon looking at the CUT_BUFFER0, and lookin' at the mouse
we then transform automaticaly for the CUT_BUFFER0 encoding into
different application specific encoding when the mouse move into
that application's top-level window. but this would be an ultra
overhead. :(

but how can we make cut-n-paste work?? (Note: this is not meant to
replace _any_ existing chinese input system, but for a special case
for cut-n-paste. it should work. ;)

I persoanlly think the 2) above is ok maybe. think gpm. a daemon maybe
is not so much difficult. ;) but, can this be a solution for gimp
and netscape and mozilla? if this is specific for xemacs, then it will
most possibly make no sense, right? if for xemacs special, we'd like
to patch xemacs itself. ;) maybe we should patch xemacs. i'll see...

what a deal for netscape and mozilla, and gimp?? any other special
applications need this?? i mean cut-n-paste. what about gnome? what
is the gnome way to do cut-n-paste? is there a OLE like way? bonobo??

best regards,

-- 
zhaoway -=- zw * zhaoway.com -=- http://www.zhaoway.com/ -=- blue ribbon
GnuPG 1024D/7C0441F2  BF4F B39D A53E A9BB 1057  2364 652C 1BA6 7C04 41F2


Reply to: