Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #224869
| From | davidson <davidson@freevolt.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Using .XCompose |
| Date | 2020-07-16 07:50 +0200 |
| Message-ID | <At4Wl-2Zc-1@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <AqWTf-6aG-1@gated-at.bofh.it> <Arjd7-4cJ-9@gated-at.bofh.it> <Arp8S-7GI-11@gated-at.bofh.it> <ArurT-2A0-3@gated-at.bofh.it> <As5hL-7Q0-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Mon, 13 Jul 2020 Greg Wooledge wrote: > On Sat, Jul 11, 2020 at 08:32:34PM +0000, davidson wrote: >> '!' marks the spot of nonbreaking spaces that made it into OP's first >> report of odd behavior, upon testing the white scissors XCompose rule: >> >> $ grep "WHITE SCISSORS" d-u_xcompose_2020-07-08.nbsp | tr $'\xc2\xa0' \! >> <Multi_key> <s> <x>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : "✄"!!!! U2704 # WHITE SCISSORS > > Note that tr does not handle multi-character sequences. If you pass > something like > > tr abc xyz > > It does *not* look for "abc" sequences and convert only those sequences. > Rather, it looks at single characters. It converts 'a' to 'x', and 'b' > to 'y', and 'c' to 'z'. > > The number of characters in the first pattern is supposed to match the > number of characters in the second pattern, so that there is a 1:1 > mapping. This much, as it happens, I knew. My intent was to make plain the nonbreaking spaces for the list, and in particular for the list archives. (Because it appears that the versions of messages posted in the web-archives do not preserve such characters.) > GNU tr also does not handle multi-byte *characters* correctly (which > violates POSIX -- it's a known bug). And *this* I did *not* know. It was my incorrect belief that the two bytes of tr's first argument would be treated by tr as a single character. It wasn't a *firm* belief. I just did not think it through carefully. Had I wanted it's actual behavior instead, I may have even expected it. Stopped clock is correct once in a while! I see now that "info tr" mentions this behavior up-front. (And indicates that in future tr will support multi-byte characters.) In the man page tr(1) I see nothing about all this. It simply talks about "characters", and assumes the reader is some kind of K&R obsessed mind-reader who knows "Well, of course a 'character' here just denotes an octet of bits." > So, your tr command actually converts all c2 bytes into ! and all a0 > bytes into ! as well. Not *just* c2a0 pairs. Thank you for catching all this, and for concise and comprehensive explanations. tr's output line was significantly longer than the line it received as input. I ought to have noticed. > Nevertheless, this is useful as a first pass approximation to say that, > hey, there *might* be a bunch of NBSPs here, and you should take a > closer look. You are being charitable. Since it does not (currently) know what characters are when they aren't composed of single octets, it was the wrong tool for the job. sed 'y/\xc2\xa0/!/' seems to do the right thing. > NBSPs most often result when someone gets lazy and pastes a line > from a web page or from a Microsoft Word/Excel document into a Unix > terminal or X11 application, instead of pasting just the characters > they actually want. Web pages, especially *older* web pages, often > use NBSPs for primitive formatting. Noted. -- Ce qui est important est rarement urgent et ce qui est urgent est rarement important -- Dwight David Eisenhower
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-06 07:40 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-06 14:30 +0200
Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-06 14:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-06 21:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-06 22:40 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 17:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-07 08:40 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 17:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-09 23:50 +0200
Re: Using .XCompose [resend of xev_output_annotated.txt] davidson <davidson@freevolt.org> - 2020-07-10 03:40 +0200
Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-10 10:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 10:40 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 12:30 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-12 17:00 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-13 06:00 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 14:00 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-13 20:30 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 20:40 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-13 20:50 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-13 21:50 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-14 05:40 +0200
Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 16:50 +0200
Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 17:10 +0200
Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 17:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 01:30 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 02:40 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-16 20:40 +0200
how u mine 4 utf8 [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 03:20 +0200
UTF-8 Everywhere -- Re: how u mine 4 utf8 [was Re: Using .XCompose] Zenaan Harkness <zenaan@freedbms.net> - 2020-07-18 07:40 +0200
Re: how u mine 4 utf8 [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 09:20 +0200
Re: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:00 +0200
Fw: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 12:50 +0200
Re: Fw: how u mine 4 utf8 [was Re: Using .XCompose] Tom Browder <tom.browder@gmail.com> - 2020-07-19 13:10 +0200
Re: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:50 +0200
sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 12:10 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Zenaan Harkness <zenaan@freedbms.net> - 2020-07-18 12:50 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] William Michels <wjm1@caa.columbia.edu> - 2020-07-18 22:00 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-18 13:20 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] songbird <songbird@anthive.com> - 2020-07-18 21:00 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-18 16:00 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-18 22:40 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-18 23:10 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-18 23:30 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-19 10:40 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-20 13:20 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Christensen <dpchrist@holgerdanske.com> - 2020-07-19 01:50 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 12:50 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Christensen <dpchrist@holgerdanske.com> - 2020-07-19 23:30 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:40 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] William Michels <wjm1@caa.columbia.edu> - 2020-07-19 21:50 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Wright <deblis@lionunicorn.co.uk> - 2020-07-23 04:00 +0200
Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] songbird <songbird@anthive.com> - 2020-07-23 12:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 02:00 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-16 20:40 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-11 17:00 +0200
Tex characters Teemu Likonen <tlikonen@iki.fi> - 2020-07-11 18:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 22:40 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 14:00 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 07:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 18:10 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-20 15:30 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-20 15:30 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-20 18:20 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-10 12:50 +0200
Re: [offlist] posting style [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:00 +0200
Re: [offlist] posting style [was Re: Using .XCompose] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-08 07:00 +0200
Re: [not-so-offlist] posting style [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-08 07:10 +0200
Re: [offlist] Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:00 +0200
Re: [offlist] Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 05:20 +0200
Re: [offlist] Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-08 05:40 +0200
Re: [offlist] Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 08:00 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-07 00:40 +0200
tangent on man page locations [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-07 01:10 +0200
Re: tangent on man page locations [was Re: Using .XCompose] David Wright <deblis@lionunicorn.co.uk> - 2020-07-07 03:50 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 11:50 +0200
Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-07 13:40 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 16:30 +0200
Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-09 02:20 +0200
Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-09 04:20 +0200
Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-08 01:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 02:30 +0200
Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:10 +0200
Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 18:40 +0200
Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-09 04:00 +0200
Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-10 02:40 +0200
Re: Using .XCompose The Wanderer <wanderer@fastmail.fm> - 2020-07-10 02:50 +0200
Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-10 05:00 +0200
csiph-web