From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings, and buffers Date: Fri, 28 Mar 2014 12:22:18 +0100 Message-ID: <87ob0qeff9.fsf@igel.home> References: <831txozsqa.fsf@gnu.org> <83ppl7y30l.fsf@gnu.org> <87r45nouvx.fsf@uwakimon.sk.tsukuba.ac.jp> <8361myyac6.fsf@gnu.org> <87a9capqfr.fsf@uwakimon.sk.tsukuba.ac.jp> <87ob0qsi7g.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396005755 29436 80.91.229.3 (28 Mar 2014 11:22:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 11:22:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 28 12:22:44 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTUry-0001b9-Sz for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 12:22:43 +0100 Original-Received: from localhost ([::1]:60557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTUry-00054m-CZ for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 07:22:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTUrq-0004y7-JJ for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:22:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTUrl-0003h5-NX for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:22:34 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:34766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTUrg-0003fq-Ct; Fri, 28 Mar 2014 07:22:24 -0400 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fwLJD1W81z4KK2k; Fri, 28 Mar 2014 12:22:20 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fwLJD14vPzbbm7; Fri, 28 Mar 2014 12:22:20 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id MeQ6_QoFR4f8; Fri, 28 Mar 2014 12:22:18 +0100 (CET) X-Auth-Info: 2W/21NFKrvFQ+uYIyb8aplen0C0J+Sw4YOWM90X62F4= Original-Received: from igel.home (ppp-88-217-34-207.dynamic.mnet-online.de [88.217.34.207]) by mail.mnet-online.de (Postfix) with ESMTPA; Fri, 28 Mar 2014 12:22:18 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 1000) id A37332C028D; Fri, 28 Mar 2014 12:22:18 +0100 (CET) X-Yow: Ask me the DIFFERENCE between PHIL SILVERS and ALEXANDER HAIG!! In-Reply-To: <87ob0qsi7g.fsf@fencepost.gnu.org> (David Kastrup's message of "Fri, 28 Mar 2014 11:58:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 212.18.0.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171069 Archived-At: David Kastrup writes: > "Stephen J. Turnbull" writes: > >> I agree that having a way to represent "undecodable bytes" in a string >> or buffer is extremely convenient. XEmacs's lack of this capability >> is surely a deficiency (Hi, David K!) > > Doing this in an utf-8 based internal coding is somewhat doable by > employing non-utf-8 sequences. Either using code points above the > Unicode code range (2^20 + something, requiring 4 bytes), or by using > non-minimal encodings (since the minimal ones are two bytes, requiring 3 > bytes). Either way, the size increases significantly. Emacs uses U3fff80-U3fffff for raw 8-bit bytes, internally represented by 2 bytes. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."