help-gnu-emacs
[Top][All Lists]
Advanced

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

Copy/paste is erratic


From: François Gannaz
Subject: Copy/paste is erratic
Date: Tue, 24 Jan 2006 11:59:05 +0100
User-agent: Mutt/1.5.11

System used :
Emacs 21.4.1 (2005-03-17 customized by Debian)
Debian GNU/Linux testing, with locale fr_FR@euro

Short description :

Copy/paste from and to Emacs of non-latin1 text is erratic. It depends
on the application used (OK from scite, not with firefox or to scite).
Is there a way to fix this with this version of emacs ? Does emacs-cvs
behave differently ?


Long description :

I first tried to copy some kanji from firefox to emacs and only obtained
question marks. Of course, I was in a unicode buffer, with mule-ucs
loaded.
But after evaluating this :
  (set-selection-coding-system 'utf-8)
I could now use the mouse to copy from firefox to scite (GTK-based) then
to emacs (scite even accepts text coming from firefox with different
html encodings like utf-8 or shift-jis). But still "???" from FF to
emacs for japanese texts, and even garbage with european texts.

On the other side, selecting text in emacs and pasting in scite does
nothing. But pasting from Emacs to firefox is OK for all the latin-1
characters. BTW, replacing firefox with opera changed nothing.

After looking around on the web, I tried several emacs commands :
  (set-selection-coding-system 'utf-8) ; allows to paste text from scite
  (setq-default enable-multibyte-characters t)
  (setq locale-coding-system 'utf-8)
  (prefer-coding-system 'utf-8)
  (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
  (setq x-select-enable-clipboard t) ; allows to paste ascii in scite
The only effect was to sometimes change question marks into \uXXXX.
Pasting the character number isn't really what I long for.

I even updated my X system from XFree 4.3 to X.org 6.8.2 with no result.
I read somewhere that there is no standard declaration of an utf-8
content of the X clipboard, but I don't know if it is related.

If someone knows a way to fix this, I would be glad to hear about it.
If possible, I'd also like to understand a bit more this strange
behaviour. How does emacs guess the encoding of the X clipboard ? How do
other applications (e.g. GTK) do ? Is there a way to view the full
content of the clipboard (including header) ? Any help would be
appreciated.

Thanks
--
François Gannaz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]