* Re: 3.0.60; Can't paste from files with .arc extensions
@ 2008-04-08 3:26 Chong Yidong
2008-04-08 6:37 ` Kenichi Handa
0 siblings, 1 reply; 2+ messages in thread
From: Chong Yidong @ 2008-04-08 3:26 UTC (permalink / raw)
To: Kenichi Handa, 45, emacs-devel; +Cc: Brian Adkins, Magnus Henoch
Magnus Henoch <mange@freemail.hu> wrote:
> 1. Create a new buffer.
> 2. Make it single-byte with M-x toggle-enable-multibyte-characters
> 3. Write something and copy it with M-x clipboard-kill-ring-save
> 4. Try to paste it into Firefox with C-v
>
> For me, nothing happens in step 4.
This bug arises from the following checkin, introduced to the unicode-2
branch on Nov 18 and subsequently merged to the trunk:
2008-02-01 Kenichi Handa <handa@m17n.org>
* select.el (selection-coding-system, next-selection-coding-system):
Move declarations from xselect.c.
(x-get-selection): Decode by selection-coding-system if it is non-nil.
If it is nil, decode by a proper coding system. Handle C_STRING.
(ccl-check-utf-8, string-utf-8-p): Delete them.
(xselect-convert-to-string): Fix determining data-type in the case
that TEXT is requested. Don't use selection-coding-system if it's
not proper for the data-type.
The problem seems to go away with the following patch to
xselect-convert-to-string, which changes the coding for unibyte string
from C_STRING back to STRING, the value prior to the Nov 18 change. But
I am unfamiliar with this part of the code. Could someone who knows
what is going on give an opinion (Handa-san)?
*** trunk/lisp/select.el.~1.39.~ 2008-02-08 15:16:35.000000000 -0500
--- trunk/lisp/select.el 2008-04-07 23:15:34.000000000 -0400
***************
*** 243,249 ****
(remove-text-properties 0 (length str) '(composition nil) str)
(if (not (multibyte-string-p str))
;; Don't have to encode unibyte string.
! (setq type 'C_STRING)
(if (eq type 'TEXT)
;; TEXT is a polimorphic target. We must select the
;; actual type from `UTF8_STRING', `COMPOUND_TEXT',
--- 243,249 ----
(remove-text-properties 0 (length str) '(composition nil) str)
(if (not (multibyte-string-p str))
;; Don't have to encode unibyte string.
! (setq type 'STRING)
(if (eq type 'TEXT)
;; TEXT is a polimorphic target. We must select the
;; actual type from `UTF8_STRING', `COMPOUND_TEXT',
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 3.0.60; Can't paste from files with .arc extensions
2008-04-08 3:26 3.0.60; Can't paste from files with .arc extensions Chong Yidong
@ 2008-04-08 6:37 ` Kenichi Handa
0 siblings, 0 replies; 2+ messages in thread
From: Kenichi Handa @ 2008-04-08 6:37 UTC (permalink / raw)
To: Chong Yidong; +Cc: info, 45, mange, emacs-devel
In article <87hcedrpqq.fsf@stupidchicken.com>, Chong Yidong <cyd@stupidchicken.com> writes:
> The problem seems to go away with the following patch to
> xselect-convert-to-string, which changes the coding for unibyte string
> from C_STRING back to STRING, the value prior to the Nov 18 change. But
> I am unfamiliar with this part of the code. Could someone who knows
> what is going on give an opinion (Handa-san)?
The contents of unibyte buffer is typically binary data, and
according to X's "Inter-Client Communication Conventions
Manual", "STRING as a type or a target specifies the ISO
Latin-1 char- acter set ...". So I chose C_STRING which is
defined as:
------------------------------------------------------------
There are some text objects where the source or intended
user, as the case may be, does not have a specific character
set for the text, but instead merely requires a zero-termi-
nated sequence of bytes with no other restriction; no ele-
ment of the selection mechanism may assume that any byte
value is forbidden or that any two differing sequences are
equivalent. For these objects, the type C_STRING should be
used.
------------------------------------------------------------
Why do you have to use a unibyte buffer?
---
Kenichi Handa
handa@ni.aist.go.jp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-08 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 3:26 3.0.60; Can't paste from files with .arc extensions Chong Yidong
2008-04-08 6:37 ` Kenichi Handa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.