unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: 22901@debbugs.gnu.org
Subject: bug#22901: drain-input doesn't decode
Date: Sun, 26 Feb 2017 09:58:42 -0800	[thread overview]
Message-ID: <4496E82C-4E88-4CDE-B73E-655CC3179E25@gmail.com> (raw)
In-Reply-To: <B5C0BF5C-7316-44AA-A89C-FF3CDE0E804C@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]


> On Feb 26, 2017, at 9:46 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> I put together a test and tried on 2.1.7 - my test fails.  See attached.
> 
>  (pass-if "encoded input"
>    (let ((fn (test-file))
> 	  (nc "utf-8")
> 	  (st "\u03b2\u03b1\u03b4 \u03b1\u03c3\u03c3 am I.")
> 	  ;;(st "hello, world\n")
> 	  )
>      (let ((p1 (open-output-file fn #:encoding nc)))
> 	;;(display st p1)
> 	(string-for-each (lambda (ch) (write-char ch p1)) st)
> 	(close p1))
>      (let* ((p0 (open-input-file fn #:encoding nc))
> 	     (s0 (begin (unread-char (read-char p0) p0) (drain-input p0))))
> 	(simple-format #t "~S\n" s0)
> 	(equal? s0 st))))
> 

My bad.  The failure was on guile-2.0.13.  It seems to work on guile-2.1.7:

mwette$ guile-2.1.7-dev3/meta/guile port-di.test
"βαδ ασσ am I."
PASS: drain-input: encoded input


[-- Attachment #2: Type: text/html, Size: 2931 bytes --]

  reply	other threads:[~2017-02-26 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04  3:09 bug#22901: drain-input doesn't decode Zefram
2016-06-20 16:12 ` Andy Wingo
2017-02-26 17:46 ` Matt Wette
2017-02-26 17:58   ` Matt Wette [this message]
2021-05-16 17:55 ` Taylan Kammer
2021-05-19 11:41 ` Taylan Kammer

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=4496E82C-4E88-4CDE-B73E-655CC3179E25@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=22901@debbugs.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).