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@"

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.naber...@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,
> 
> 
> 

Reply via email to