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-15  7:52 Miles Bader
@ 2002-07-15 16:18 ` Eli Zaretskii
  2002-07-16  1:40   ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2002-07-15 16:18 UTC (permalink / raw)
  Cc: emacs-devel


On 15 Jul 2002, Miles Bader wrote:

> 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.

What is the character set of the non-ASCII characters you paste?  Also, 
can you please post one example of that ``line noise'' exactly as 
displayed by Mozilla?  Finally, does anything change if you use 
compound-text as your selection-coding-system?

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

* Re: non-ASCII cut/paste emacs <-> mozilla
  2002-07-15 16:18 ` Eli Zaretskii
@ 2002-07-16  1:40   ` Miles Bader
  2002-07-16  4:37     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2002-07-16  1:40 UTC (permalink / raw)
  Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=iso-2022-jp-2, Size: 1556 bytes --]

Eli Zaretskii <eliz@is.elta.co.il> writes:
> > 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.
> 
> What is the character set of the non-ASCII characters you paste?

It seems to happen with everything I've tried; I originally wanted to
cut/paste japanese characters, for which C-x = says:

    charset: japanese-jisx0208 (JISX0208.1983/1990 Japanese Kanji: ISO-IR-87.)

However, the same thing happens with `latin-iso8859-1' characters.

> Also, can you please post one example of that ``line noise'' exactly
> as displayed by Mozilla?

If I try to paste this word:     caf^[.A^[Ni
from emacs into mozilla, I get:  caf?

If I try to paste this word:     ^[$B3NG'^[(B 
from emacs into mozilla, I get:  <box>$(B3NG'<box>(B
where <box> is a little graphical box.

Interestingly enough, if I cut the above `<box>$(B3NG'<box>(B'
gibberish out of mozilla, and paste _that_ into emacs, it looks correct
in emacs!  So mozilla is apparently just pasting the raw encoded
characters from X, without interpretation.

[However, that _doesn't_ happen with the latin-1 characters -- the `?'
displayed in mozilla for `^[.A^[Ni' is apparently a real question-mark.]

> Finally, does anything change if you use
> compound-text as your selection-coding-system?

No.

-Miles
-- 
Run away!  Run away!

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

* Re: non-ASCII cut/paste emacs <-> mozilla
  2002-07-16  1:40   ` Miles Bader
@ 2002-07-16  4:37     ` Eli Zaretskii
  2002-07-16  4:55       ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2002-07-16  4:37 UTC (permalink / raw)
  Cc: emacs-devel


On 16 Jul 2002, Miles Bader wrote:

> Interestingly enough, if I cut the above `<box>$(B3NG'<box>(B'
> gibberish out of mozilla, and paste _that_ into emacs, it looks correct
> in emacs!  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?

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

* Re: non-ASCII cut/paste emacs <-> mozilla
  2002-07-16  4:37     ` Eli Zaretskii
@ 2002-07-16  4:55       ` Miles Bader
  2002-07-16  4:56         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2002-07-16  4:55 UTC (permalink / raw)
  Cc: emacs-devel

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?

Thanks,

-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'

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

* Re: non-ASCII cut/paste emacs <-> mozilla
  2002-07-16  4:55       ` Miles Bader
@ 2002-07-16  4:56         ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2002-07-16  4:56 UTC (permalink / raw)
  Cc: emacs-devel


On 16 Jul 2002, Miles Bader wrote:

> 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.

Me too.  Does setting selection-coding-system to latin-1 change anything 
for Latin-1 characters?

> 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?

Not really the answer you wanted, but using raw-text as 
selection-coding-system is one possibility to do something like that.

^ 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-16 13:07 non-ASCII cut/paste emacs <-> mozilla Kenichi Handa
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15  7:52 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

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).