From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: unencodable-char-position bug? Date: Wed, 15 Feb 2006 22:48:59 +0200 Message-ID: <200602152248.59556.pogonyshev@gmx.net> References: <200602150019.25230.pogonyshev@gmx.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1140044631 4977 80.91.229.2 (15 Feb 2006 23:03:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2006 23:03:51 +0000 (UTC) Cc: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 16 00:03:48 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F9VgV-0002Jr-Ag for ged-emacs-devel@m.gmane.org; Thu, 16 Feb 2006 00:03:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9VgU-0006ql-A7 for ged-emacs-devel@m.gmane.org; Wed, 15 Feb 2006 18:03:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F9TgJ-0003HI-SD for emacs-devel@gnu.org; Wed, 15 Feb 2006 15:55:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F9TZH-000429-Fb for emacs-devel@gnu.org; Wed, 15 Feb 2006 15:48:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9TYv-0003Im-F0 for emacs-devel@gnu.org; Wed, 15 Feb 2006 15:47:45 -0500 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1F9Tdt-0004vG-Mf for emacs-devel@gnu.org; Wed, 15 Feb 2006 15:52:54 -0500 Original-Received: (qmail invoked by alias); 15 Feb 2006 20:47:43 -0000 Original-Received: from unknown (EHLO [82.209.227.64]) [82.209.227.64] by mail.gmx.net (mp033) with SMTP; 15 Feb 2006 21:47:43 +0100 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50587 Archived-At: Kenichi Handa wrote: > In article <200602150019.25230.pogonyshev@gmx.net>, Paul Pogonyshev writes: >=20 > > Is it correct that >=20 > > (unencodable-char-position 0 1 'utf-8 nil "=D1=8B") >=20 > > evaluates to 0? >=20 > No. But my Emacs (CVS HEAD) evaluates that to nil, which is > correct. Which version of Emacs are you using? Just update to CVS HEAD, the same result, zero. Weird... > > In general, what is the best way to determine if given character > > is encodable in given coding system? >=20 > Using unencodable-char-position is good. You can also use > these: >=20 > (memq 'SOME_CODING_SYSTEM (find-coding-systems-region FROM TO)) > or > (memq 'SOME_CODING_SYSTEM (find-coding-systems-string STRING)) This works, i.e. (memq 'mule-utf-8 (find-coding-systems-string "=D1=8B")) evaluates to non-nil... Paul