guile-devel
[Top][All Lists]
Advanced

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

Re: Unicode ports patch


From: Andy Wingo
Subject: Re: Unicode ports patch
Date: Tue, 01 Sep 2009 20:25:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi,

On Tue 01 Sep 2009 10:19, address@hidden (Ludovic Courtès) writes:

> Mike Gran <address@hidden> 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.  
>
> 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
-- 
http://wingolog.org/




reply via email to

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