From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: =?utf-8?q?Re=3A_=5BPATCH=5D_Have_string_ports_honor_=E2=80=98=25?= =?utf-8?q?default-port-encoding=E2=80=99?= Date: Tue, 5 Jan 2010 10:21:21 -0800 (PST) Message-ID: <587683.85903.qm@web37905.mail.mud.yahoo.com> References: <87pr5p9zg0.fsf@gnu.org> <217394.1649.qm@web37902.mail.mud.yahoo.com> <87fx6kj4m1.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 1262715709 10682 80.91.229.12 (5 Jan 2010 18:21:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2010 18:21:49 +0000 (UTC) Cc: guile-devel@gnu.org To: =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 05 19:21:42 2010 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 1NSE27-0007oW-Sd for guile-devel@m.gmane.org; Tue, 05 Jan 2010 19:21:32 +0100 Original-Received: from localhost ([127.0.0.1]:40832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSE28-0007kg-7v for guile-devel@m.gmane.org; Tue, 05 Jan 2010 13:21:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSE24-0007kM-VX for guile-devel@gnu.org; Tue, 05 Jan 2010 13:21:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSE1z-0007iJ-8J for guile-devel@gnu.org; Tue, 05 Jan 2010 13:21:27 -0500 Original-Received: from [199.232.76.173] (port=44801 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSE1z-0007iE-1B for guile-devel@gnu.org; Tue, 05 Jan 2010 13:21:23 -0500 Original-Received: from web37905.mail.mud.yahoo.com ([209.191.91.167]:44390) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NSE1y-0002Hk-NQ for guile-devel@gnu.org; Tue, 05 Jan 2010 13:21:22 -0500 Original-Received: (qmail 87381 invoked by uid 60001); 5 Jan 2010 18:21:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1262715681; bh=WCgC642FEPOmzl3SZVyX2E6FyI8D4gdB72HiLqJzKSw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wnoRBB0V+S6P0EaiixoNWttOg4m/cB7zSNiurKrZK4e/vmN7q/U62DbM9E2Zhmv4OSrMXMLOnEjSpJEwG8TZeVrB8darUWwp+gPhIipGlxx0s51s0DdHPqAqqqOitmE4ldhqPgdXt5OH8hCLZG89Gl+jr/2Y7p+VD1NIOe7NdqU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=T/rutPvl6rkOAT8X5xpxBxQ6qahOpEh1x+Czu/BFVBBoMd1UVzhWYucsewS4spRjMWqMO/hCyl1ziqNfPwzAqPJ1Kk4AZelohIieWmzanidBAYY+gEqTT39qhPHsthFjCQlAb08CkJbrnjHvcZTpDT75bj1MFsWMImgmhNLePn0=; X-YMail-OSG: zDsGh14VM1mjCudIp3w3YIm1_6HDnDoiz9S4Hb7D9yWNnTZ4K2LsCBHE5n8yOqNCgxePJ2T.bzeUiCHhGw8bIIgVCfCAN6Mu0CNJHHg4PC006YqDyIx1EGE1u70sBO13Vi_T4ZwLkf3F6_.Eiy2Tj5G4uSsMbGmdj8b9989YNE_Df5RfEQE9Fr3uNjfJ1nNG9bK62bo4F1SV0XxQp2NcFY56lclyg32fYs1ojRLBv.tDNdF_ahxp7yWITeeq7rszUU3zN5zhosH57oho_dG.lNzeXiihTGGUJMt.PyeF.1BB06Q0RgYFujQKaEvnLL1bi_Q3WmU- Original-Received: from [207.8.91.2] by web37905.mail.mud.yahoo.com via HTTP; Tue, 05 Jan 2010 10:21:21 PST X-Mailer: YahooMailRC/240.3 YahooMailWebService/0.8.100.260964 In-Reply-To: <87fx6kj4m1.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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:9829 Archived-At: > Ludo sez: =0A=0A> The (undocumented) =E2=80=98scm_to_stringn ()=E2=80=99 = returns the number of characters,=0A> AFAICS.=0A=0AI'll try to get a doc pa= tch in this weekend.=0A=0AThe second parameter to scm_to_stringn gets fille= d with the result buffer=0Alength from either mem_iconveh or u32_conv_to_en= coding, so it is definitely=0Athe length in bytes of the locale-encoded str= ing.=0A=0AMaybe I can also make a unit test for this function.=0A=0A> > Als= o, in the big scheme of things, I wonder if the name "string port"=0A> > is= misleading now.=C2=A0 Strings can contain the whole codepoint range.=C2=A0= =0A> > But string ports can't store the whole range depending on their enc= oding.=0A> > (That's what the "UTF-8" hack was about.)=0A> =0A> Yes, it=E2= =80=99s tricky.=C2=A0 The problem is that currently we can send both=0A> te= xtual and binary data to a given port (unlike the R6RS port API, which=0A> = judiciously distinguishes textual and binary ports.)=C2=A0 Because of that,= I=0A> think string ports can=E2=80=99t just use a fixed encoding.=0A> =0A>= What do you think?=0A=0AI'm fine with having the string ports operate this= way.=C2=A0 I think the =0Aparallelism to other ports is a good thing.=C2= =A0 =0A=0AI know that I'm 'splitting hairs', but there are a couple of plac= es in =0Athe docs that refer to string ports being "ports *on* a scheme str= ing", when=0Ain truth they are ports initialized by strings or that output = to strings.=0AThat is a trivial point of nomenclature, though.=0A=0AThanks,= =0A=0AMike=0A