From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#481: Crashes with non-default language environments Date: Wed, 25 Jun 2008 11:58:03 +0900 Message-ID: References: <87y79wve9b.fsf@jurta.org> <87zlu96bp2.fsf@jurta.org> <87prv4l96f.fsf@jurta.org> <87lk5scl3a.fsf@catnip.gol.com> Reply-To: Kenichi Handa , 481@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1214363263 4461 80.91.229.12 (25 Jun 2008 03:07:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2008 03:07:43 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, miles@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 25 05:08:27 2008 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 1KBLMv-00088z-Hc for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jun 2008 05:08:25 +0200 Original-Received: from localhost ([127.0.0.1]:49415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBLM5-0005KI-Vf for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jun 2008 23:07:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBLLo-0005FG-SR for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2008 23:07:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBLLm-0005E3-Gh for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2008 23:07:15 -0400 Original-Received: from [199.232.76.173] (port=54455 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBLLm-0005E0-8o for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2008 23:07:14 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37815) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KBLLl-0000lI-OA for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2008 23:07:14 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5P37AB2004510; Tue, 24 Jun 2008 20:07:11 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m5P35581003459; Tue, 24 Jun 2008 20:05:05 -0700 X-Loop: don@donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 25 Jun 2008 03:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 481 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12143626951338 (code B ref -1); Wed, 25 Jun 2008 03:05:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 25 Jun 2008 02:58:15 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5P2wBgG001332 for ; Tue, 24 Jun 2008 19:58:13 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:55097 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KBLCt-0004Af-Qr for emacs-pretest-bug@gnu.org; Tue, 24 Jun 2008 22:58:03 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KBLCx-0007Ei-42 for emacs-pretest-bug@gnu.org; Tue, 24 Jun 2008 22:58:10 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:53100) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KBLCw-0007EH-Ft; Tue, 24 Jun 2008 22:58:07 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m5P2x7b6017572; Wed, 25 Jun 2008 11:59:07 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m5P2w4qu029385; Wed, 25 Jun 2008 11:58:04 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m5P2w3DN008095; Wed, 25 Jun 2008 11:58:03 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1KBLCt-0007B8-RJ; Wed, 25 Jun 2008 11:58:03 +0900 In-reply-to: (message from Stefan Monnier on Tue, 12 Feb 2008 11:29:55 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 24 Jun 2008 23:07:15 -0400 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:18529 gmane.emacs.pretest.bugs:22682 Archived-At: This is the thread of long ago. In article , Stefan Monnier writes: > > But, even if we implement string-to-unibyte, it should be > > used for a string containing only ascii and eight-bit chars. > > And in that case, string-make-unibyte behaves exactly the > > same as string-to-unibyte. > No it would be different: it would also signal an error if some > non-binary char is found. (I might potentially be convinced that it's > OK to additionally accept the 128-255 latin1 chars as alternatives to > eight-bit chars, since they now get character codes 128-255). I've just installed a change to implement string-to-unibyte as below and used it to fix the problem of jpeg detection. (string-to-unibyte string &optional accept-latin-1) Return a unibyte string with the same individual chars as string. If string is unibyte, the result is string itself. Otherwise it is a newly created string, with no text properties, where each `eight-bit' character is converted to the corresponding byte. If string contains a non-ASCII, non-`eight-bit' character, an error is signalled. If the optional 2nd arg accept-latin-1 is non-nil, a Latin-1 character doesn't cause an error, but is converted to a byte of same code. --- Kenichi Handa handa@ni.aist.go.jp