bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Combining characters not applied to fullwidth characters


From: Gavin Troy
Subject: Combining characters not applied to fullwidth characters
Date: Sun, 22 May 2022 18:16:19 +0100
User-agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27

Hi,

It would seem combining characters are not correctly applied to fullwidth 
characters when using the likes of addstr (or addwstr). From a glance at the 
source it seems it is added to x-1 when it would need to be applied to x-2 for 
this case.

Example follows below using the following characters (although this selection 
is arbitrary).
U+30BB (KATAKANA LETTER SE)
U+3099 (COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK)

This prints as セ rather than ゼ.

Gavin


#include <locale.h>
#include <curses.h>

int main (int argc, char *argv[]) {
  setlocale(LC_CTYPE, "");

  initscr();
  addstr("\xe3\x82\xbb\xe3\x82\x99\n");
  clrtoeol();
  getch();
  endwin();

  return 0;
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]