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

Fancy characters only work with `-string-` functions

Open sjl opened this issue 9 years ago • 3 comments

This works as expected:

(write-string-at-point charms:*standard-window* "ó" 0 0)

But using the -char version doesn't seem to write anything at all:

(write-char-at-point charms:*standard-window* #\ó 0 0)

I can just use the string variant, but it would be nice if the char one worked too.

sjl avatar Aug 05 '16 11:08 sjl

I suspect this has to do with improper/confused types. There's chtype and wchar and etc. Will look into.

stylewarning avatar Aug 16 '16 22:08 stylewarning

I'm still running into this issue but I haven't figured it out.

stylewarning avatar Feb 05 '18 07:02 stylewarning

This now appears to happen for the -string- variants too:

(defun minimal-test ()
  (charms:with-curses ()
    (charms/ll:timeout 10000)
    (charms:disable-echoing)
    (charms/ll:curs-set 0)
    (charms:write-char-at-point t #\return_symbol 1 1)
    (charms:write-string-at-point t "⏎test" 1 2)
    (charms:insert-char-at-point t #\return_symbol 1 3)
    (charms:insert-char-at-point t #\e 1 3)
    (charms:get-char t :ignore-error t)))

Running the above code on SBCL 2.1.11.debian on AMD64 Linux with ncurses 6.3 yields ~O~Ntest instead of ⏎test on line 2 (from write-string-at-point) and nothing on lines 1 or 3 (from {write,insert}-char-at-point). Prior to an upgrade from SBCL 1.8-ish, UTF-8/Unicode characters worked alright.

fouric avatar Jun 13 '22 03:06 fouric