> From: l...@gnu.org (Ludovic Courtès) > Cc: Eli Zaretskii <e...@gnu.org>, guile-user@gnu.org > Date: Wed, 19 Jun 2013 21:26:34 +0200 > > > diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test > > index 9b1c6c0..758f8f6 100644 > > --- a/test-suite/tests/ports.test > > +++ b/test-suite/tests/ports.test > > @@ -238,7 +238,7 @@ > > (pass-if "file: binary mode ignores port encoding" > > (with-fluids ((%default-port-encoding "UTF-8")) > > (let* ((filename (test-file)) > > - (port (open-file filename "w")) > > + (port (open-file filename "wb")) > > (test-string "一二三") > > (binary-test-string > > (apply string > > @@ -257,7 +257,7 @@ > > (pass-if "file: binary mode ignores file coding declaration" > > (with-fluids ((%default-port-encoding "UTF-8")) > > (let* ((filename (test-file)) > > - (port (open-file filename "w")) > > + (port (open-file filename "wb")) > > (test-string "一二三") > > (binary-test-string > > (apply string > > Yes, looks good.
But this doesn't work. You get "???" in the file, because binary ports cannot have encoding. As I wrote, I tried that, and when it didn't work, debugged it and saw that this is simply not supported (the docs say as much). What am I missing?