Hi Andy, Andy Wingo <wi...@pobox.com> writes: > The patch looks good to me but I am concerned about the behavior > change, and that it is inconvenient to get the previous behavior. > > My instinct is that we should not merge this patch without including a > way to enable the coding sniff; which seems to mean adding keywords or > somehow extending the arguments of: > > open-file > with-input-from-file > with-output-to-file > call-with-output-file > call-with-input-file > open-input-file
I'd be glad to do this. I've long wanted these to accept keyword arguments for encoding and binary mode. We could also have a keyword to ask Guile to guess the encoding. This could be used to simplify the code used in 'compile-file' etc. We could also add a fluid to specify whether 'open-file' should try to guess the encoding, if that helps. What do you think? Mark