bug-ncurses
[Top][All Lists]
Advanced

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

something wrong with wchar_t printing?


From: folkert
Subject: something wrong with wchar_t printing?
Date: Tue, 1 May 2018 18:19:39 +0200
User-agent: NeoMutt/20170306 (1.8.0)

Hi,

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.


Folkert van Heusden

-- 



reply via email to

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