From: <gr...@us...> - 2009-08-18 13:01:15
|
Hello, can we anticipate terminal coding ? we might have to check in/output-encoding and replace problematic characters ? On Sat, 8 Aug 2009, Ben Finney wrote: > On 08-Aug-2009, Ben Finney wrote: >> It also suggests that the behaviour is very much dependent on the >> terminal character encoding; we would probably do well to explicitly >> test with ‘groff -Tutf-8’, ‘groff -Tascii’, ‘groff -Tlatin1’, at >> minimum. > > An example of the differences: > > ===== > $ groff_input='\(lq,\(rq,\(ga,\(aa,\(aq,",'\'',`' > > $ for coding in utf8 ascii latin1 ; do \ > echo "Terminal coding $coding:" ; \ > echo $groff_input | groff -T$coding | cat -s | hexdump -C ; \ > done > Terminal coding utf8: > 00000000 e2 80 9c 2c e2 80 9d 2c 60 2c c2 b4 2c 27 2c 22 |...,...,`,..,',"| > 00000010 2c e2 80 99 2c e2 80 98 0a 0a |,...,.....| > 0000001a > Terminal coding ascii: > 00000000 22 2c 22 2c 60 2c 27 2c 27 2c 22 2c 27 2c 60 0a |",",`,',',",',`.| > 00000010 0a |.| > 00000011 > Terminal coding latin1: > 00000000 22 2c 22 2c 60 2c b4 2c 27 2c 22 2c 27 2c 60 0a |",",`,.,',",',`.| > 00000010 0a |.| > 00000011 > ===== > > -- > \ “A new swimming pool is rapidly taking shape since the | > `\ contractors have thrown in the bulk of their workers.” | > _o__) newspaper article, east Africa | > Ben Finney <be...@be...> > -- |