Composing another bug report today, I found that the CLI of gnuplot with set encoding utf8 would ruin the plane-1 Unicode char in ☺😊 — when one tries to input these from keyboard (my layouts — and fonts — allow this. As well as “much more” — to put it mildly).
Instead, ☺�� is shown. The code to replace the UTF-16 surrogates by � can be safely disabled now (at least when the surrogates come in correct pairs).
Thanks,
Ilya
Just in case — for people who never saw it before: the support of these chars¹⁾ is backwards compatible — they take 2 UTF-8 surrogates to encode, and take the “2 cells worth” of the screen real estate to be shown. So the
readlinecode does not need to be changed.²⁾