From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: Re: Face problems when yanking cyrillic text from other X applications Date: Mon, 05 Nov 2007 22:31:14 +0000 Message-ID: <472F99B2.5070908@gnu.org> References: <1194258557.962041.108510@50g2000hsm.googlegroups.com> <472F893E.1080909@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194301892 14240 80.91.229.12 (5 Nov 2007 22:31:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 22:31:32 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, "cmr.Pent@gmail.com" To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 23:31:36 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IpATn-0007Yq-EG for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2007 23:31:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpATc-0006Ru-Q5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2007 17:31:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpATX-0006Ro-GZ for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2007 17:31:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpATW-0006Rc-2b for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2007 17:31:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpATV-0006RZ-Ty for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2007 17:31:17 -0500 Original-Received: from outmail1.freedom2surf.net ([194.106.33.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpATV-0001tj-Kj for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2007 17:31:17 -0500 Original-Received: from [127.0.0.1] (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail1.freedom2surf.net (Postfix) with ESMTP id A453F514ED; Mon, 5 Nov 2007 22:31:16 +0000 (GMT) User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <472F893E.1080909@gnu.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16914 Archived-At: Jason Rumney wrote: > but reading the doc string, it appears that the default is to use some > sort of heuristic. I'm not sure why the heuristic prefers iso-2022-jp > encoded Cyrillic over UTF8 encoding in a ru_RU.UTF-8 locale. > The heuristics used are documented above the definition of x-select-utf8-or-ctext. I think we should change the second condition to match Cyrillic as well as Latin characters. ;; (2) Otherwise, if they are different at Nth character, and that ;; of UTF8 is a Latin character and that of CTEXT belongs to a CJK ;; character set, select UTF8. Also select UTF8 if the Nth ;; character of UTF8 is non-ASCII where as that of CTEXT is ASCII. ;; This is because an X client may replace unsupported characters ;; with some ASCII character (typically ` ' or `?') in CTEXT.