Fri 03 May 2013 09:26:20 PM UTC, original submission:
A variety of the ISO-8859 (ECMA-48) encodings use the high bytes to specify additional characters. We should add an option to support emitting the appropriate control sequences at the beginning of every text section, and allow high bytes and so forth, so that the characters seen between the pipes (|) are the characters intended by the program that sent those control sequences. Similarly for multibyte encodings such as EUC-JP or Shift-JIS.
Teseq would have to potentially restore single-byte, ASCII mode at the end of each text section, and then remember enough state to restore the program's current encoding state as described in the input up until now, at the beginning of the next text section.
Could also be used for graphical effects as well: displaying bolded or colored text, etc.
This could result in interoperability issues with reseq, since all of a sudden it's getting extra control sequences in the text blocks, so would wind up emitting extra stuff that wasn't in the original. We don't want to break "teseq < original | reseq -> original".
We could opt to only support this sort of thing through a "smart" parser of teseq output, that transforms teseq output into charaset+graphics-enhanced versions.
Or perhaps better, we could introduce a new set of brackets, say, ( ), that designate these graphically-enhanced text sections, and emit them (when requested) along with | | blocks. Reseq will then ignore the ( ) and grab the | | stuff only. We might wish to provide an option that allows users to disable | | blocks, warning (as we do for -E) that using this option prevents reseq from being used to restore the original input.
|