[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Surrogate pairs for addwstr?
From: |
Thomas Dickey |
Subject: |
Re: Surrogate pairs for addwstr? |
Date: |
Mon, 11 Oct 2021 06:39:07 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Oct 11, 2021 at 03:05:49PM +1100, Tim Allen wrote:
> On Sun, Oct 10, 2021 at 11:38:22AM -0400, Bill Gray wrote:
> > The other way to put this would be to ask : if you're on a
> > system with 32-bit wchar_ts, what should happen for this line?
> >
> > mvaddwstr( 0, 2, L"\xd83d\xdd1e Treble clef with a surrogate pair");
>
> Honestly, what I'd *expect* to happen is a compile-time or run-time
> error. This is what, for example, Rust does:
no - in curses, you'd get a blank (or the replacement character if appropriate)
> Printing gibberish is never particularly helpful, but encouraging people
in the case being discussed, it's giving a blank.
whether that's appropriate largely depends on how the underlying system
libraries prefer to treat surrogate pairs :-)
...in any case, if it's as described and observed, it goes into my to-do
list - a nuisance but not critical -
https://invisible-island.net/personal/self-service.html
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature