l...@gnu.org (Ludovic Courtès) writes: > Hi! > > Mark H Weaver <m...@netris.org> skribis: > >> SRFI-6 (string ports) says nothing about port encodings, and yet >> portable code written for SRFI-6 will fail on Guile 2.0 unless the >> string is constrained to whatever the default port encoding happens to >> be. This is not just a theoretical issue; it has caused trouble in >> practice, e.g.: >> >> http://bugs.gnu.org/11197 > > Hey, there’s a patch for SRFI-6 there. Could we resume the discussion > in that bug? > > Guile ports are mixed textual/binary ports. Whether this or separate > binary/textual ports as in R6 is best is an interesting question, but as > you note, we cannot really change that currently.
I don't understand this distinction. A port transfers characters, like strings contain characters. The relation is 1:1. The question of encoding only concerns ports connected to a file, or a terminal, and then textual/binary is a question of encoding/decoding. A port that stays within Guile has no business being concerned with encoding. It has to reproduce the characters from its input to its output without change. Things are complicated enough talking to the outside. There is no point in Guile being confused even when talking to itself. -- David Kastrup