> Having looked into this a bit more, I wonder if Guile should even try to > set the port encoding itself. As far as I can tell, there's no way to > know the encoding of the response payload in the general case, without > knowledge of the specific MIME media type. We could teach Guile about > "application/json", but if we follow that path, it would lead to us > teaching Guile's web library about more media types over time, but we > cannot hope to know about all of them.
> Since it's not feasible for Guile to reliably choose the right encoding > for arbitrary media types, perhaps it would be better for Guile to > explicitly say that it's the application programmer's job to set the > encoding of the port, if it contains textual data. "application/json" is common enough that it would be convenient for the application programmer to have Guile know about it. But, as a Guile maintainer, this is your call. I don't have strong opinions this way or that.