From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Re: Inadequate documentation of silly characters on screen. Date: Thu, 19 Nov 2009 16:47:09 +0000 Message-ID: <19205.30349.786007.611623@parhasard.net> References: <20091118191258.GA2676@muc.de> <20091119082040.GA1720@muc.de> <874ooq8xay.fsf@wanchan.jasonrumney.net> <20091119141852.GC1720@muc.de> <20091119155848.GB1314@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258650384 6782 80.91.229.12 (19 Nov 2009 17:06:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 17:06:24 +0000 (UTC) Cc: Jason Rumney , Andreas Schwab , Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 18:06:13 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBASF-00029T-Ub for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 18:06:00 +0100 Original-Received: from localhost ([127.0.0.1]:46489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBASF-0004cT-FO for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 12:05:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBAAJ-0004rb-WC for emacs-devel@gnu.org; Thu, 19 Nov 2009 11:47:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBAAF-0004jm-83 for emacs-devel@gnu.org; Thu, 19 Nov 2009 11:47:27 -0500 Original-Received: from [199.232.76.173] (port=52160 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBAAF-0004iw-5Q for emacs-devel@gnu.org; Thu, 19 Nov 2009 11:47:23 -0500 Original-Received: from daedalus.ipv4.asclepian.ie ([213.133.100.226]:59281 helo=daedalus.asclepian.ie) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBAA9-0002it-Uh; Thu, 19 Nov 2009 11:47:18 -0500 Original-Received: by daedalus.asclepian.ie (Postfix, from userid 1002) id 6782BB856; Thu, 19 Nov 2009 16:47:10 +0000 (GMT) In-Reply-To: <20091119155848.GB1314@muc.de> X-Mailer: VM 8.0.12 under 21.5 (beta29) "garbanzo" dd29ed9c6962+ XEmacs Lucid (x86_64-unknown-freebsd7.2) X-Echelon-distraction: WHCA PGP 2.6.2. IWG AFSPC Colonel NSS X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:117263 Ar an nao=C3=BA l=C3=A1 d=C3=A9ag de m=C3=AD na Samhain, scr=C3=ADobh Al= an Mackenzie:=20 > Hi, Stefan, >=20 > On Thu, Nov 19, 2009 at 10:30:18AM -0500, Stefan Monnier wrote: > > > The actual character in the string is =C3=B1 (#x3f). >=20 > > No: the string does not contain any characters, only bytes, because = it's > > a unibyte string. >=20 > I'm thinking from the lisp viewpoint. The string is a data structure > I really don't want to have to think about > the difference between "chars" and "bytes" when I'm hacking lisp. If = I > do, then the abstraction "string" is broken. For some context on this, that=E2=80=99s how it works in XEmacs; we=E2=80= =99ve never had problems with it, we seem to avoid an entire class of programming errors that GNU Emacs developers deal with on a regular basis. Tangentally, for those that like the unibyte/multibyte distinction, to my knowledge the editor does not have any way of representing =E2=80=9Can oc= tet with numeric value < #x7f to be treated with byte semantics, not character semantics=E2=80=9D, which seems arbitrary to me. For example:=20 ;; Both the decoded sequences are illegal in UTF-16: (split-char (car (append (decode-coding-string "\xd8\x00\x00\x7f" 'utf-16-be) nil))) =3D> (ascii 127) (split-char (car (append (decode-coding-string "\xd8\x00\x00\x80" 'utf-16-be) nil))) =3D> (eight-bit-control 128) --=20 =E2=80=9CApart from the nine-banded armadillo, man is the only natural ho= st of Mycobacterium leprae, although it can be grown in the footpads of mice.=E2= =80=9D -- Kumar & Clark, Clinical Medicine, summarising improbable leprosy res= earch