From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings, and buffers Date: Fri, 28 Mar 2014 12:34:56 +0100 Organization: Organization?!? Message-ID: <87k3besgin.fsf@fencepost.gnu.org> 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> <87ob0qeff9.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396006524 6393 80.91.229.3 (28 Mar 2014 11:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 11:35:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 28 12:35:33 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 1WTV4O-0000JV-Uy for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 12:35:33 +0100 Original-Received: from localhost ([::1]:60631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTV4O-00021k-4Y for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 07:35:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTV4D-0001m4-KB for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:35:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTV47-0007tj-Hb for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:35:21 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:59498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTV47-0007tX-BR for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:35:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTV40-0008Vx-4d for emacs-devel@gnu.org; Fri, 28 Mar 2014 12:35:08 +0100 Original-Received: from x2f4fc20.dyn.telefonica.de ([2.244.252.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Mar 2014 12:35:08 +0100 Original-Received: from dak by x2f4fc20.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Mar 2014 12:35:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f4fc20.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:Vqw7xJ8gPiiPhsUs0Gwz4PtIY6Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:171070 Archived-At: Andreas Schwab writes: > 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. Well, I forgot the non-minimal encodings for 0x00-0x7f, namely two-byte sequences starting with 0xc0 or 0xc1 and ending with 0x80-0xbf. Those would still fit the representation invariants. Are those the two-byte encodings used for "raw 0x80 to 0xff"? -- David Kastrup