* Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-29-ge211d69
[not found] <E1Tv8dr-0003Ex-Ub@vcs.savannah.gnu.org>
@ 2013-01-16 15:54 ` Ludovic Courtès
2013-01-16 16:40 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2013-01-16 15:54 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-devel
"Andy Wingo" <wingo@pobox.com> skribis:
> fix string->bytevector for utf-8 and non-error conversion strategies
>
> * module/ice-9/iconv.scm (call-with-encoded-output-string):
> (string->bytevector, bytevector->string): Only call string->utf8 and
> utf8->string if the conversion strategy is `error'.
string->bytevector cannot fail when the encoding is UTF-8.
As for bytevector->string, you should compare against
(%default-port-conversion-strategy) rather than 'error, I think.
Would be nice to have tests for these corner cases.
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-29-ge211d69
2013-01-16 15:54 ` [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-29-ge211d69 Ludovic Courtès
@ 2013-01-16 16:40 ` Andy Wingo
2013-01-16 17:24 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2013-01-16 16:40 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
On Wed 16 Jan 2013 16:54, ludo@gnu.org (Ludovic Courtès) writes:
> As for bytevector->string, you should compare against
> (%default-port-conversion-strategy) rather than 'error, I think.
Why do you say that? utf-8->string should always raise an error if it
detects invalid UTF-8, no?
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-29-ge211d69
2013-01-16 16:40 ` Andy Wingo
@ 2013-01-16 17:24 ` Ludovic Courtès
0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2013-01-16 17:24 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-devel
Andy Wingo <wingo@pobox.com> skribis:
> On Wed 16 Jan 2013 16:54, ludo@gnu.org (Ludovic Courtès) writes:
>
>> As for bytevector->string, you should compare against
>> (%default-port-conversion-strategy) rather than 'error, I think.
>
> Why do you say that? utf-8->string should always raise an error if it
> detects invalid UTF-8, no?
This is left unspecified in R6RS (as crazy as it may seem), and the
behavior of our implementation depends on %default-port-conversion-strategy.
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-16 17:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1Tv8dr-0003Ex-Ub@vcs.savannah.gnu.org>
2013-01-16 15:54 ` [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-29-ge211d69 Ludovic Courtès
2013-01-16 16:40 ` Andy Wingo
2013-01-16 17:24 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).