On 14 Sep 2009, at 9:05 pm, John Cowan wrote: [nasty stateful encodings] > The bad case is ISO 2022 where multiple different encodings are used, > several at a time, and you use an escape sequence to switch from one > to > another. See the Wikipedia article for the incredibly grotty details. > I actually implemented this in the front end to FIGlet.
*nod* > Anyhow, when you've read the last character in a run, have you > or have you not read the bytes of the escape sequence that > terminates the run? Depends on how the run is terminated, leading onto: >> I ask because it's not uncommon to interleave binary and text in a >> stream. Many binary formats have embedded strings, for example. > > True, but the delimitation of the string is format-specific: fixed > length, counted, and NUL-terminated are all in use. That's not > something a general-purpose package can easily handle. ...no, but a general-purpose package ought to provide the tools to handle these problems, or else it's not so general-purpose :-) ABS -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/archives/author/alaric/ _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
