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: Sat, 29 Mar 2014 18:18:54 +0100 Organization: Organization?!? Message-ID: <87y4zsorcx.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> <83eh1mfd09.fsf@gnu.org> <87ob0pnyt6.fsf@uwakimon.sk.tsukuba.ac.jp> <87a9c9aqhu.fsf@nbtrap.com> <877g7d3pbe.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396113630 3580 80.91.229.3 (29 Mar 2014 17:20:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 17:20:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 29 18:20:24 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 1WTwve-0008TA-W8 for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 18:20:23 +0100 Original-Received: from localhost ([::1]:40250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTwve-0008O8-GA for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2014 13:20:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTwvV-0008Ac-Q6 for emacs-devel@gnu.org; Sat, 29 Mar 2014 13:20:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTwvP-0003W4-Iw for emacs-devel@gnu.org; Sat, 29 Mar 2014 13:20:13 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTwvP-0003Vg-D6 for emacs-devel@gnu.org; Sat, 29 Mar 2014 13:20:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTwvN-0008EQ-7m for emacs-devel@gnu.org; Sat, 29 Mar 2014 18:20:05 +0100 Original-Received: from x2f4094b.dyn.telefonica.de ([2.244.9.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 18:20:05 +0100 Original-Received: from dak by x2f4094b.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 18:20:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f4094b.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:R+QNM8bp+BIs26VajYkrpHZG+wo= 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:171164 Archived-At: Nathan Trapuzzano writes: > Nathan Trapuzzano writes: > >> For example, say we decode a stream of raw bytes as utf8, but that the >> stream contains some non-utf8 sequences. > > Of course, most programming languages would simply refuse to decode by, > e.g., throwing an exception. But that's not really appropriate for an > editor. On one hand, you need some way to distinguish between > characters and bytes, even if the distinction's not made by the type > system; on the other hand, an _editor_ of all things should be able to > deal with both kinds at the same time without the distinction being > lost, and Emacs does a tremendous job at this IMO. _De_coding into a _unibyte_ buffer is a lossy operation by definition since a unibyte buffer cannot hold the full set of values that _de_coding delivers. -- David Kastrup