Re: [dev] [st] Rendering only half of emoji in curses-based program

From: Andrej Nabergoj <andrej.nabergoj_AT_siol.net>
Date: Mon, 21 Apr 2025 21:46:28 +0200

Now I understand a little what terminal does and what programs are
responsible for. So if I use this example curses program and save output
to file (with this option -o) I get this additional escape sequences
after wide character (backspace, space,...) but not if I draw it on
positions other than (row-1, col-3).

Part of output: "字[1_AT_"

Example program:

#include <curses.h>
#include <locale.h>
int main() {
    int row, col;
    setlocale(LC_ALL, "");
    initscr();
    getmaxyx(stdscr, row, col);
    mvprintw(row-1, col-3, "字");
    getch();
    endwin();
    return 0;
}

Do you have any idea why? What should I look at now?
Thank you!

Regards,
Andrej

On 07/04/25 09:45, Roberto E. Vargas Caballero wrote:
> Quoth Andrej Nabergoj <andrej.nabergoj_AT_siol.net>:
> > For the same string without curses there is no problem, so probably is
> > not st problem, but in other terminals I don't get such behavior.
> >
>
> Ok, this is an important point. It is possible that some terminfo
> capability has some effect on this topic. There is the option -o
> in st that allows you to get a full copy of the input stream and
> then you can see if there is something else happening that you cannot
> see.
>
> Regards,
>
>
>
Received on Mon Apr 21 2025 - 21:46:28 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 21 2025 - 23:12:09 CEST