unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: bug-guile@gnu.org
Subject: Re: r6rs-ports.test is failing
Date: Fri, 17 Dec 2010 17:38:59 +0100	[thread overview]
Message-ID: <87pqt02w2k.fsf@gnu.org> (raw)
In-Reply-To: 20101217163011.4462V.3548.root@cdptpa-web06-z01

Hi!

<dsmich@roadrunner.com> writes:

> ---- "Ludovic Courtès" <ludo@gnu.org> wrote: 

[...]

>>   (define p (open-bytevector-input-port #vu8(255 1 2 3 103 110 117)))
>>   (set-port-conversion-strategy! p 'substitute)
>>   (get-line p)
>> 
>> Here on x86_64-linux-gnu, with libunistring 0.9.3, it returns a
>> 7-character string ending in “gnu”.
>
> scheme@(guile-user)> (use-modules (rnrs))
> scheme@(guile-user)> (define p (open-bytevector-input-port #vu8(255 1 2 3 103 110 117)))
> scheme@(guile-user)> (set-port-conversion-strategy! p 'substitute)
> scheme@(guile-user)> (get-line p)
> $1 = "�\x01\x02\x03gnu"

And this?

    (let* ((t  (make-transcoder (utf-8-codec) (native-eol-style)
                                (error-handling-mode replace)))
           (b  (open-bytevector-input-port #vu8(255 1 2 3 103 110 117)))
           (tp (transcoded-port b t)))
      (port-conversion-strategy tp))

Ludo’.




  reply	other threads:[~2010-12-17 16:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01 22:28 r6rs-ports.test is failing dsmich
2010-12-06 20:09 ` dsmich
2010-12-17 13:51 ` Ludovic Courtès
2010-12-17 16:30   ` dsmich
2010-12-17 16:38     ` Ludovic Courtès [this message]
2010-12-17 16:42       ` dsmich
2011-01-22 15:57 ` Andy Wingo
2011-01-24 15:54   ` dsmich
2011-01-26 20:36     ` dsmich
2011-01-27 17:09       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqt02w2k.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).