[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is correct to use waddnstr for utf8 strings?
From: |
Thomas Dickey |
Subject: |
Re: is correct to use waddnstr for utf8 strings? |
Date: |
Thu, 2 May 2019 05:27:22 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, May 01, 2019 at 04:48:01PM +0200, Pavel Stehule wrote:
> Hi
>
> st 1. 5. 2019 v 14:39 odesílatel Pavel Stehule <address@hidden>
> napsal:
>
> > Hi
> >
> > I try to fix some issues with utf8 chars on Solaris.
...
> I wrote small test. Looks so Solaris doesn't work correctly with 3bytes
> utf8 chars. Two bytes are ok.
>
> Is it ncurses issue or Solaris issue?
I suspect Solaris (though I might find time on the weekend to investigate
this).
There's an additional factor that the package is probably rather old.
>
> Pavel
> #include <ncursesw/curses.h>
>
> #include <locale.h>
>
> #include <string.h>
>
>
>
> int main()
>
> {
>
> /* these strings has 30 chars display width */
>
> char *str1 = "└────────────────────────────┴";
>
One problem with Solaris, which I worked-around a few years ago,
is that all of the line-drawing characters are "ambiguous width",
and that Solaris' locale assigns all of those to double-width.
See
https://invisible-island.net/ncurses/NEWS.html#t20151219
and subsequent mention of Solaris.
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature
- is correct to use waddnstr for utf8 strings?, Pavel Stehule, 2019/05/01
- Re: is correct to use waddnstr for utf8 strings?, Pavel Stehule, 2019/05/01
- Re: is correct to use waddnstr for utf8 strings?,
Thomas Dickey <=
- Re: is correct to use waddnstr for utf8 strings?, Pavel Stehule, 2019/05/02
- Re: is correct to use waddnstr for utf8 strings?, Thomas Dickey, 2019/05/04
- Re: is correct to use waddnstr for utf8 strings?, Pavel Stehule, 2019/05/05
- Re: is correct to use waddnstr for utf8 strings?, Thomas Dickey, 2019/05/05
- Re: is correct to use waddnstr for utf8 strings?, Pavel Stehule, 2019/05/05