cl-str icon indicating copy to clipboard operation
cl-str copied to clipboard

Fix: char-code for *whitespaces* characters

Open kilianmh opened this issue 1 year ago • 2 comments

Use char-code for *whitespaces* characters. This should prevent future problems with some implementations that do not support specific characters in the reader.

This should work regardless of implementation. Tested on: sbcl, ccl, ecl, abcl, cmu, allegro.

From now on we should add characters only with char-code to avoid errors? @vindarel

kilianmh avatar Jun 30 '24 14:06 kilianmh

oooh this looks wise, but we are loosing a user-facing QoL.

We can easily see what's in the whitespaces variable:

str:*whitespaces*
(#\Backspace #\Tab #\Newline #\Newline #\Vt #\Page #\Return #\  #\Rubout
 #\Next-Line #\NO-BREAK_SPACE)

not so with charcodes.

I really like cl-str to be easily inspectable, clear, etc. Maybe there's a better way. Or we maintainers have to work harder and add some tests / a CI for the future.

vindarel avatar Jul 02 '24 12:07 vindarel

not so with charcodes.

Is it? I get the same result with this PR when putting str:*whitespaces* in the repl.

Also there are comments after every character-code with the respective character.

kilianmh avatar Jul 08 '24 00:07 kilianmh