unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* non-ASCII cut/paste emacs <-> mozilla
@ 2002-07-15  7:52 Miles Bader
  2002-07-15 16:18 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2002-07-15  7:52 UTC (permalink / raw)


Has anyone else out there managed to get cut and paste between emacs and
mozilla (v1.0) working for non-ASCII text?  When I cut text out of
mozilla and paste it into emacs, I get a question-mark for each
noN-ASCII character; in the reverse direction, I get line-noise type
stuff that I assume is the raw encoding.

[selection-coding-system's value is `compound-text-with-extensions']

I think this is a mostly a problem with mozilla rather than with emacs
because emacs works slightly better with kterm (at least, I can cut text
out of kterm and paste it into emacs successfully), but mozilla
bug-reporting is much more daunting, so I'd like to see if anyone here
has any ideas first...

Thanks,

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: non-ASCII cut/paste emacs <-> mozilla
@ 2002-07-16 13:07 Kenichi Handa
  0 siblings, 0 replies; 7+ messages in thread
From: Kenichi Handa @ 2002-07-16 13:07 UTC (permalink / raw)
  Cc: eliz, emacs-devel

Miles Bader <miles@lsi.nec.co.jp> writes:
> Eli Zaretskii <eliz@is.elta.co.il> writes:
>>  > So mozilla is apparently just pasting the raw encoded
>>  > characters from X, without interpretation.
>>  
>>  Yes, it looks like a ctext-encoded string.  You can verify that by 
>>  setting a breakpoint in x_encode_text and looking at the string it is 
>>  about to send to X.
>>  
>>  Weird.  What system is that?

> Debian unstable.

> It seems as if it's just mozilla's problem, but I'm rather astonished
> that it can't even deal with latin-1 characters.

> Has anyone out there successfully used Mozilla to cut/paste non-ASCII text?

> Also, does anyone know of any low-level tools that cat be used to
> directly send/receive binary data to/from the X cut buffer mechanism, so
> I can reduce the variables to one program?

Run Emacs under gdb and set breakpoints at
selection_data_to_lisp_data and lisp_data_to_selection_data,
then see how bytes are decoded/encoded.

At least, with this Mozilla:
	Mozilla 1.0
	Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0)
	Gecko/20020615 Debian/1.0.0-3
I found very strange behavour.  It seems that Mozilla is
very sensitive to locale.

If you run Mozilla under LANG=ja_JP.eucjp, you can
copy&paste Japanese text with Emacs correctly.  But, in that
case, if you copy&paste latin-1 from Mozilla to Emacs,
Mozilla encode latin-1 by euc-jp while treating all latin-1
chars as JISX0212.  Thus, in that case, before pasting the
characters into Emacs, you must do C-x C-m X euc-jp RET.

And if you run Mozilla under LANG=de_DE, Mozilla correctly
handles latin-1, but doesn't handle Japanese characters at
all in copy&paste even if they are displayed correctly.

If you run Mozilla under LANG=C, Mozilla doesn't handle
latin-1 nor japanese characters in copy&paste.

---
Ken'ichi HANDA
handa@etl.go.jp

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-07-16 13:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-15  7:52 non-ASCII cut/paste emacs <-> mozilla Miles Bader
2002-07-15 16:18 ` Eli Zaretskii
2002-07-16  1:40   ` Miles Bader
2002-07-16  4:37     ` Eli Zaretskii
2002-07-16  4:55       ` Miles Bader
2002-07-16  4:56         ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2002-07-16 13:07 Kenichi Handa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).