Article View: news.software.readers
Article #264290Re: trn 4 and UTF-8
From: Arlen Holder
Date: Wed, 05 Aug 2020 22:33
Date: Wed, 05 Aug 2020 22:33
59 lines
3102 bytes
3102 bytes
On Wed, 5 Aug 2020 20:52:51 +0000 (UTC), Eli the Bearded wrote:
> Michael Bรคuerle posted using an ISO-8859-1 mime-encoded word for his
> last name ("Michael =?ISO-8859-1?Q?B=E4uerle?="), which trn dumped raw
> to screen, xterm ignored it as an invalid UTF-8 sequence and the columns
> broke. Alignment also breaks when a valid multi-octet UTF-8 sequence
> displays as a single character.
I have what I think is that same problem with telnet/vim that the funky
diagraph characters don't show up, on your end, as being what they were
on my end.
I never knew why.
o <https://i.postimg.cc/TP0dsDyX/smartquote01.jpg>
For example, this is a cut-and-paste of what you wrote:
"Michael Bรคuerle posted using an ISO-8859-1 mime-encoded word"
(where the "a" in his last name is xxx in vim)
I just never knew shy smart quotes don't get sent properly.
<https://practicaltypography.com/straight-and-curly-quotes.html>
For example, here's a cut-and-paste verbatim from this web site:
<https://community.adobe.com/t5/dreamweaver/how-to-convert-straight-quotes-to-smart-quotes-or-set-as-default/td-p/9819629?page=1>
left single quote โ ‘
right single quote (and apostrophe) โ ’
left double quote โ “
right double quote โ ”
Here's a cut and page from
<https://www.lifewire.com/typing-quotes-apostrophes-and-primes-1074104>
' Straight single apostrophe ' ' '
" Straight double quote " " "
โ Opening single apostrophe alt+0145 option+] ‘
โ Closing single apostrophe alt+0146 option+shift+] ’
โ Opening double quote alt+0147 option+[ “
โ Closing double quote alt+0148 option+shift+[ ”
Notice that, in vim, a "ga" (i.e., get ascii) shows the following:
The "a" in Bauerle is decimal 228.
An opening single apostrophe is decimal 145.
A closing single apostrophe is decimal 146.
A curly single opening doublequote is decimal 147.
A curly single closing double quote is decimal 148.
Same with bullets (decimal 149) and long dashes.
When I want to "fix" them in vim, I use the following sequence:
(1) Get the current diagraph of an unprintable ASCII character:
ga (remember this as 'get ascii')
(2) Find diagraph of bullet which is decimal 149:
:/\%d149<return>
(3) Replace it with something else:
:s/\%d149/:/g
--
Every post to Usenet archives should help someone now & in the future.
Technical Details
Message-ID:
<rgfc30$gm3$1@news.mixmin.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<rganif$m4h$1@neodome.net> <eli$2008051309@qaz.wtf> <rgeqfo$6qp$2@dont-email.me> <eli$2008051347@qaz.wtf> <eli$2008051651@qaz.wtf>Show Full Headers
Complete Article Headers
Message-ID: <rgfc30$gm3$1@news.mixmin.net> Subject: Re: trn 4 and UTF-8 Date: Wed, 05 Aug 2020 22:33:05 +0000 From: Arlen Holder <arlenholder@newmachine.com> References: <rganif$m4h$1@neodome.net> <eli$2008051309@qaz.wtf> <rgeqfo$6qp$2@dont-email.me> <eli$2008051347@qaz.wtf> <eli$2008051651@qaz.wtf> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.readers Organization: Mixmin Injection-Date: Wed, 5 Aug 2020 22:33:05 -0000 (UTC) X-Received-Body-Crc: 980372320 X-Received-Bytes: 3171