From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.user Subject: Re: Running script from directory with UTF-8 characters Date: Wed, 23 Dec 2015 22:53:14 +0100 Organization: Organization?!? Message-ID: <874mf8hlx1.fsf@fencepost.gnu.org> References: <87twnbfkzb.fsf@elektro.pacujo.net> <20151222003447.198ea945@bother.homenet> <87io3rffo5.fsf@elektro.pacujo.net> <20151222142125.17ba7368@bother.homenet> <87bn9ieaup.fsf@elektro.pacujo.net> <20151222201240.3a66fd94@bother.homenet> <87oadicjbc.fsf@elektro.pacujo.net> <83wps6p5d2.fsf@gnu.org> <87d1tycgdr.fsf@elektro.pacujo.net> <83vb7pnhnt.fsf@gnu.org> <877fk5as8r.fsf@elektro.pacujo.net> <83poxxnenn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1450907631 25157 80.91.229.3 (23 Dec 2015 21:53:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Dec 2015 21:53:51 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Dec 23 22:53:39 2015 Return-path: Envelope-to: guile-user@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 1aBrLm-0000Ku-QM for guile-user@m.gmane.org; Wed, 23 Dec 2015 22:53:38 +0100 Original-Received: from localhost ([::1]:58051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBrLm-0007iz-CW for guile-user@m.gmane.org; Wed, 23 Dec 2015 16:53:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBrLd-0007hd-Pn for guile-user@gnu.org; Wed, 23 Dec 2015 16:53:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBrLa-0005FP-Js for guile-user@gnu.org; Wed, 23 Dec 2015 16:53:29 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:41450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBrLa-0005F3-DR for guile-user@gnu.org; Wed, 23 Dec 2015 16:53:26 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aBrLW-0008JE-W0 for guile-user@gnu.org; Wed, 23 Dec 2015 22:53:23 +0100 Original-Received: from x2f41007.dyn.telefonica.de ([2.244.16.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Dec 2015 22:53:22 +0100 Original-Received: from dak by x2f41007.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Dec 2015 22:53:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f41007.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/25.1.50 (gnu/linux) Cancel-Lock: sha1:s+FR52GelcetmC1/90BKUD1puRs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12276 Archived-At: Eli Zaretskii writes: > From: Marko Rauhamaa > >> Why don't you tell me already what emacs does? > > I did, you elided that. It represents text as superset of UTF-8, and > uses high codepoints above the Unicode space for raw bytes. Incorrect. It uses overlong encodings of 0x00-0x7f for raw bytes in the 0x80-0xff range (0x00-0x7f are always represented as themselves). Those are not allowed in properly encoded UTF-8 and take only two bytes (byte patterns 0xc0 0x80–0xbf and 0xc1 0x80–0xbf), so random byte patterns get inflated by somewhat less than 50% on average (every pattern allowed in properly encoded UTF-8 is left unchanged, of course). That's more economical than Python's method which uses the encodings of surrogate words not allowed in properly encoded UTF-8, taking 3 bytes rather than the 2 Emacs makes do with. Using high codepoints above the Unicode space would even take 4 bytes. -- David Kastrup