Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "G.K." <g@k.invalid> |
|---|---|
| Newsgroups | sci.crypt, alt.security.pgp, alt.bbs, comp.terminals, alt.computer.security |
| Subject | [solved] Unsafe terminal escape sequences and ANSI codes from decryption |
| Date | 2023-03-06 04:04 -0600 |
| Organization | Cyber23 news |
| Message-ID | <tu4dmn$1rcr$1@news.cyber23.de> (permalink) |
| References | <tu1ml1$ti6$1@news.cyber23.de> <tu3qvf$n907$1@news.xmission.com> <tu44aq$1o4r$1@news.cyber23.de> <81zg8q9qiu.fsf@thyestes.tartarus.org> |
Cross-posted to 5 groups.
On 3/6/23 03:29, Simon Tatham wrote:
> "G.K." <g@k.invalid> writes:
>> Another distinction occurs to me that might ease the problem
>> requirement. Is there a cheap way to distinguish between control codes
>> and formatting codes (color, foreground, background, underline,
>> blinkenlights) codes in a text stream.
>
> 'less -R' does something along those lines. I don't know if the
> filtering code is conveniently separable from the rest of 'less', but
> it might be a start: somebody else has already done the work of making a
> set of decisions about which codes count in which category.
This solves the problem. This is a boon and does almost all the work
necessary. From the less manual:
[quote]
-R or --RAW-CONTROL-CHARS
Like -r, but only ANSI "color" escape sequences are output in "raw"
form. Unlike -r, the screen appearance is maintained correctly in most
cases. ANSI "color" escape sequences are sequences of the form:
ESC [ ... m
where the "..." is zero or more color specification characters For the
purpose of keeping track of screen appearance, ANSI color escape
sequences are assumed to not move the cursor. [/quote]
After this I can pipe through a few intelligent line length and UTF-8
validation checks and ship it.
--
G.K.
Back to sci.crypt | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
? Unsafe terminal escape sequences and ANSI codes from decryption "G.K." <g@k.invalid> - 2023-03-05 03:19 -0600
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-05 09:59 -0700
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption legalize+jeeves@mail.xmission.com (Richard) - 2023-03-06 04:42 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Jan Panteltje <alien@comet.invalid> - 2023-03-06 06:25 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption "G.K." <g@k.invalid> - 2023-03-06 01:25 -0600
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption "G.K." <g@k.invalid> - 2023-03-06 01:31 -0600
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Simon Tatham <anakin@pobox.com> - 2023-03-06 09:29 +0000
[solved] Unsafe terminal escape sequences and ANSI codes from decryption "G.K." <g@k.invalid> - 2023-03-06 04:04 -0600
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Phil Carmody <pc+usenet@asdf.org> - 2023-03-07 09:36 +0200
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption legalize+jeeves@mail.xmission.com (Richard) - 2023-03-06 18:36 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption drb@ihatespam.msu.edu (Dennis Boone) - 2023-03-06 22:29 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-06 17:21 -0700
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption drb@ihatespam.msu.edu (Dennis Boone) - 2023-03-07 00:35 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-06 18:19 -0700
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption drb@ihatespam.msu.edu (Dennis Boone) - 2023-03-07 01:41 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-06 23:35 -0700
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Jakob Bohm <jb-usenet@wisemo.com.invalid> - 2023-03-17 14:23 +0100
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption kludge@panix.com (Scott Dorsey) - 2023-03-07 02:22 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-06 23:46 -0700
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption kludge@panix.com (Scott Dorsey) - 2023-03-08 20:56 +0000
Re: ? Unsafe terminal escape sequences and ANSI codes from decryption legalize+jeeves@mail.xmission.com (Richard) - 2023-03-07 05:37 +0000
csiph-web