From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: survey: string external representation Date: Sun, 05 Feb 2012 10:32:13 +0100 Message-ID: <87d39td3s2.fsf@gnuvola.org> References: <87wr8edhac.fsf@gnuvola.org> <87k44dbfu5.fsf@gnuvola.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1328434375 13209 80.91.229.3 (5 Feb 2012 09:32:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2012 09:32:55 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Feb 05 10:32:54 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtySq-0002of-8T for guile-user@m.gmane.org; Sun, 05 Feb 2012 10:32:52 +0100 Original-Received: from localhost ([::1]:54857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtySm-0005wb-D6 for guile-user@m.gmane.org; Sun, 05 Feb 2012 04:32:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtySi-0005wV-GW for guile-user@gnu.org; Sun, 05 Feb 2012 04:32:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtySh-0003UN-Bd for guile-user@gnu.org; Sun, 05 Feb 2012 04:32:44 -0500 Original-Received: from smtp207.alice.it ([82.57.200.103]:58243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtySg-0003Ty-Tj for guile-user@gnu.org; Sun, 05 Feb 2012 04:32:43 -0500 Original-Received: from ambire (95.245.72.123) by smtp207.alice.it (8.6.023.02) id 4F05A665037F6C0B for guile-user@gnu.org; Sun, 5 Feb 2012 10:32:42 +0100 Original-Received: from ttn by ambire with local (Exim 4.72) (envelope-from ) id 1RtySD-0001SA-NH for guile-user@gnu.org; Sun, 05 Feb 2012 10:32:13 +0100 In-Reply-To: <87k44dbfu5.fsf@gnuvola.org> (Thien-Thi Nguyen's message of "Fri, 27 Jan 2012 11:27:30 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 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:9240 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: 7Bit () Thien-Thi Nguyen () Fri, 27 Jan 2012 11:27:30 +0100 The code assumes Guile 2 DTRT [...] Well, further investigation raises new doubts. The issue really is in contiguous mixed raw and \x-escaped octets, and not just single byte external representation, so here is a followup experiment that addresses that directly: --=-=-= Content-Type: text/x-scheme; charset=utf-8 Content-Disposition: inline; filename=xrep2.scm Content-Transfer-Encoding: Quoted-Printable (setlocale LC_ALL "") (define (hmm symbol) (define (show x) (display x) (display "\t") (write x) (newline)) (newline) (show symbol) (let ((string (symbol->string symbol))) (show string) (show (object->string string)))) (display "LANG: ") (write (getenv "LANG")) (newline) (hmm 'foo) (hmm '#{f\"o b\\r}#) (hmm '=E2=8C=AC) ; U+232C (utf-8: E2 8C AC) (hmm '=F0=AF=A6=B2) ; U+2F9B2 (utf-8: F0 AF A= 6 B2) (hmm '=F0=AF=A6=BC) ; U+2F9BC (utf-8: F0 AF A= 6 BC) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: 7Bit Below are the output of two runs: guile -s xrep2.scm \ | tee xrep2-$(guile --version | sed 's/.* //;q')-$LANG.out What do other people see? --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=xrep2-1.4.1.124-it_IT.UTF-8.out Content-Transfer-Encoding: Base64 TEFORzogIml0X0lULlVURi04Ig0KDQpmb28JZm9vDQpmb28JImZvbyINCiJmb28iCSJcImZvb1wi Ig0KDQoje2ZcIm9cIGJcXHJ9Iwkje2ZcIm9cIGJcXHJ9Iw0KZiJvIGJccgkiZlwibyBiXFxyIg0K ImZcIm8gYlxcciIJIlwiZlxcXCJvIGJcXFxcclwiIg0KDQrijKwJ4oysDQrijKwJIuKMrCINCiLi jKwiCSJcIuKMrFwiIg0KDQrwr6ayCfCvprINCvCvprIJIvCvprIiDQoi8K+msiIJIlwi8K+mslwi Ig0KDQrwr6a8CfCvprwNCvCvprwJIvCvprwiDQoi8K+mvCIJIlwi8K+mvFwiIg0K --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=xrep2-1.8.7-it_IT.UTF-8.out Content-Transfer-Encoding: Base64 TEFORzogIml0X0lULlVURi04Ig0KDQpmb28JZm9vDQpmb28JImZvbyINCiJmb28iCSJcImZvb1wi Ig0KDQoje1xmXFxcIm9cIGJcXFxccn0jCSN7XGZcXFwib1wgYlxcXFxyfSMNCmZcIm8gYlxccgki ZlxcXCJvIGJcXFxcciINCiJmXFxcIm8gYlxcXFxyIgkiXCJmXFxcXFxcXCJvIGJcXFxcXFxcXHJc IiINCg0K4tCMCeLQjA0K4tCMCSLiXHg4Y6wiDQoi4lx4OGOsIgkiXCLiXFx4OGOsXCIiDQoNCvCv prIJ8K+msg0K8K+msgki8K+msiINCiLwr6ayIgkiXCLwr6ayXCIiDQoNCvCvprwJ8K+mvA0K8K+m vAki8K+mvCINCiLwr6a8IgkiXCLwr6a8XCIiDQoNCg== --=-=-=--