Brian Harvey scripsit: > What if the file has a magic binary header followed by the rest in > Unicode text?
Load a library that provides read-blob and can analyze parts of a blob in different ways, including as text (that SRFI I keep promising). > This would, for example, allow jumping around while reading a text file > by saving the current /byte/ position and then returning to it later. That's precisely what isn't reliable. In ISO 2022, for example, you have to remember not only the current byte position but up to 6 sub-encodings (G0, G1, SS2, SS3, C0, C1) currently in effect in order to be able to resume textual decoding. R6RS allows for this by allowing port-position to return an opaque object on textual files, but I think it's a big mess. -- Barry gules and argent of seven and six, John Cowan on a canton azure fifty molets of the second. [email protected] --blazoning the U.S. flag http://www.ccil.org/~cowan _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
