* Copy/paste is erratic
@ 2006-01-24 10:59 François Gannaz
0 siblings, 0 replies; only message in thread
From: François Gannaz @ 2006-01-24 10:59 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-24 10:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 10:59 Copy/paste is erratic François Gannaz
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).