From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Unicode ports patch Date: Tue, 01 Sep 2009 20:25:26 +0200 Message-ID: References: <1251212782.18373.10335.camel@localhost.localdomain> <87hbvnnkl8.fsf@gnu.org> 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 1251829584 1948 80.91.229.12 (1 Sep 2009 18:26:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2009 18:26:24 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 01 20:26:17 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MiY3a-0004RQ-E7 for guile-devel@m.gmane.org; Tue, 01 Sep 2009 20:26:14 +0200 Original-Received: from localhost ([127.0.0.1]:44807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiY3Z-0003oA-Lb for guile-devel@m.gmane.org; Tue, 01 Sep 2009 14:26:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiY2h-0003JR-7k for guile-devel@gnu.org; Tue, 01 Sep 2009 14:25:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiY2c-0003Ei-FG for guile-devel@gnu.org; Tue, 01 Sep 2009 14:25:18 -0400 Original-Received: from [199.232.76.173] (port=45472 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiY2c-0003EW-46 for guile-devel@gnu.org; Tue, 01 Sep 2009 14:25:14 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:36357 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiY2Y-0003yN-RX; Tue, 01 Sep 2009 14:25:10 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 095674032B; Tue, 1 Sep 2009 14:25:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=9/oktiW/2s+k dZny/Pz3RNDPmzY=; b=K7HCSruuMCZeo6NO+XS+VH3k3DOHG6S/ymGLnwCevEJj 7xFLHEtebKC9HTVqQ1dDFjjh3Ube+JYO57NEMwQfHQjUs7OBBUgXD8kHnK+ZFmF3 dDgE1KtYScVYYR66GWxR4xDbZVZNBXp17lHz6vgNeUhrQ+axkNK/8iVHBHJCe04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=aX0C7m iJMvOkZC7hApgMuf5iTcW6Jdsx65MN2T0gT+z9RhYwhrXNqZCbR267B3NWP+4gdp hJhtqKrA73xd/l1eo5qDkMnK9qSv3L9TXT/8YscFQvzsMiWy3l2sJEPn2q0geqE3 gDl7OecjZSnKsr6YQpVkYONS2S5K3T49lvzt4= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id EB60C4032A; Tue, 1 Sep 2009 14:25:06 -0400 (EDT) Original-Received: from unquote (unknown [83.37.98.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C737040329; Tue, 1 Sep 2009 14:25:04 -0400 (EDT) In-Reply-To: <87hbvnnkl8.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 01 Sep 2009 10:19:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: C64A7C54-9724-11DE-9768-8B19076EA04E-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9233 Archived-At: Hi, On Tue 01 Sep 2009 10:19, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mike Gran writes: > >> The latest commit 'Add full Unicode capability to ports and the default >> reader' 889975e51accb80491af76fc5db980aeb3edd342 adds the majority of >> the functionality for non-ASCII strings.=20=20 > > This patch adds a few functions related to string ports: > > * libguile/strports.c: store string ports in locale encoding > (scm_strport_to_locale_u8vector, scm_call_with_output_locale_u8vector) > (scm_open_input_locale_u8vector, scm_get_output_locale_u8vector): > new functions > > I think it would be nicer if these used bytevectors instead of u8vectors > and were locale-independent (which would match the `string->utf8' & > co. API). Also I would make `scm_strport_to_locale_u8vector ()' > private. And finally, it'd be even better if it were documented in the > manual. :-) > > Actually I'm not convinced that `call-with-output-locale-*' and > `open-input-locale-*' are useful, precisely because we can use a string > port to get a string and then `string->utf8' to get at the string bits. FWIW, I think I agree with all of Ludovic's comments; though if there is a way that we can simply arrange to output bytes to an R6RS binary output port, I think there are already efficient means to collect the bytes from such a port in a bytevector. Cheers, Andy --=20 http://wingolog.org/