Re: Display UTF-8 / non-ASCII characters in trn (2-line patch)
Status: Beta
Brought to you by:
wayned
|
From: Adam H. K. <ah...@ch...> - 2015-11-04 22:30:13
|
At 2:59pm -0000, 11/04/15, John Magolske <lis...@b7...> wrote: >I recently started using trn (Debian trn4 = trn-4.0-test77), and >after taking the time to learn how to use it, am liking it a lot. >One annoyance however was the garbled display of non-ASCII characters. >A curly single quote would display as @^Y for example. . . . Hey! A question I can answer... This has nothing to do with trn but your terminal's locale settings and things like the LANG environmental variable. trn passes characters along to the display to be rendered by a display process. Generally, the display won't have any idea what MIME headers are present (assuming MIME correctly describes the character set used by the author which isn't always the case), so you may need to change this from article to article so the characters are translated as intended. I don't always bother to change the locale when reading, but when composing in followup, I need to see the non-ASCII characters. Sometimes I mis-set the translation to make non-plain-text characters visible. I try to avoid quoting nonbreaking spaces, for instance; I wish people would stop using such characters inappropriately. If at all possible, I turn the quotes into ASCII if the non-ASCII characters aren't needed, like substituting left open double quote with a good olde ASCII ambiguous double quote. My text editor is vim which has its own envirnment variables. I can't comment on the patch you suggest, but perhaps it's not needed. I wish people who are clueless about what typesetting really is would stop using left open quote and left close quote (single and double) when composing for plain text. The ASCII characters work great, despite being ambiguous. Also, I've seen the use of left open quote paired with an ASCII quote. People are weird. Also, note how many people are clueless that in UTF-8, close single quote and apostrophe have different character codes. Just use ASCII in these situations. |