shlomif / fortune-mod

Implementation of the Unix fortune command for displaying a random quotation, for Linux and other systems.
http://www.shlomifish.org/open-source/projects/fortune-mod/
Other
428 stars 60 forks source link

backspace characters #81

Closed komacke closed 1 year ago

komacke commented 1 year ago

There seem to be a number of places where the backspace character is in the fortune text. When the fortune is sent in email it's not recognized as text and gets converted to an attachment. Also some viewers show ^H instead of rendering the backspace of the text that was intended to be deleted. (vim displays the ^H whereas less interprets it.)

One example is the 'definitions' file. Check "Gray's Law of Programming:". Also this picks up the affected lines: grep -P '[\b]' definitions

It seems like most examples originally had some underscore syntax that comes through as "_^H'.

Maybe we want this and fortune should have an option to convert the output into plain text?

shlomif commented 1 year ago

On Fri, 28 Apr 2023 07:39:14 -0700 Dave Koberstein @.***> wrote:

There seem to be a number of places where the backspace character is in the fortune text. When the fortune is sent in email it's not recognized as text and gets converted to an attachment. Also some viewers show ^H instead of rendering the backspace of the text that was intended to be deleted. (vim displays the ^H whereas less interprets it.)

One example is the 'definitions' file. Check "Gray's Law of Programming:". Also this picks up the affected lines: grep -P '[\b]' definitions

It seems like most examples originally had some underscore syntax that comes through as "_^H'.

Maybe we want this and fortune should have an option to convert the output into plain text?

thanks! I'll see what we can do.

--

Shlomi Fish https://www.shlomifish.org/ https://www.shlomifish.org/lecture/C-and-CPP/bad-elements/

The Messiah will come when everybody assume his role. — https://www.shlomifish.org/philosophy/the-eternal-jew/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

shlomif commented 1 year ago

@komacke : should be fixed in git master

shlomif commented 1 year ago

shud be fixed

komacke commented 1 year ago

I'm a little late getting back to you. Thanks for the fix! Looks like it is coming through in the Fedora 39 release next week.