bug-ncurses
[Top][All Lists]
Advanced

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

Re: something wrong with wchar_t printing?


From: folkert
Subject: Re: something wrong with wchar_t printing?
Date: Wed, 2 May 2018 20:24:08 +0200
User-agent: NeoMutt/20170306 (1.8.0)

> > I wrote a question on stackoverflow regarding printing of std::wstring
> > using ncurses
> > (https://stackoverflow.com/questions/50118848/utf-8-stdwstring-ncurses ).
> > I'm starting to believe the problem is in waddwstr.
> > 
> > If I have a utf-8 string in "temp", then convert that to std::wstring
> > using
> >     std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
> >     std::wstring wstr = converter.from_bytes(temp);
> > then
> >     waddwstr(win, wstr.c_str());
> > prints a space for CERTAIN special characters. An U+00E4 prints fine but an
> > U+1F5E0 prints as a space.
> > If I print them in utf-8 format using wprintw, they come out allright.
> 
> What size is wchar on your box?

It is
/usr/include/curses.h:typedef unsigned short wchar_t;


Folkert van Heusden



reply via email to

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