guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Have string ports honor ‘%default- port-encoding’


From: Ludovic Courtès
Subject: Re: [PATCH] Have string ports honor ‘%default- port-encoding’
Date: Thu, 07 Jan 2010 11:37:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi,

Mike Gran <address@hidden> writes:

>> The (undocumented) ‘scm_to_stringn ()’ returns the number of characters,
>> AFAICS.
>
> I'll try to get a doc patch in this weekend.

As a start, I added a small description in the source:

  
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=29bcdbb05948a5f12d2d8cb36a0c3c582e738be3

>> > Also, in the big scheme of things, I wonder if the name "string port"
>> > is misleading now.  Strings can contain the whole codepoint range.  
>> > But string ports can't store the whole range depending on their encoding.
>> > (That's what the "UTF-8" hack was about.)
>> 
>> Yes, it’s tricky.  The problem is that currently we can send both
>> textual and binary data to a given port (unlike the R6RS port API, which
>> judiciously distinguishes textual and binary ports.)  Because of that, I
>> think string ports can’t just use a fixed encoding.
>> 
>> What do you think?
>
> I'm fine with having the string ports operate this way.  I think the 
> parallelism to other ports is a good thing.  

Committed this:

  
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=7b0419128bce68f48a158292430ed4a7202aa1b1

Thanks for the review!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]