mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 02:58:29 +00:00
curses: add option to specify VGA font encoding
This uses iconv to convert glyphs from the specified VGA font encoding to unicode, and makes use of cchar_t instead of chtype when using ncursesw, which allows to store all wide char as well as the WACS values. The default charset is made CP437 since that is the charset of the hardware default VGA font. This also makes the curses backend set the LC_CTYPE locale to "" to allow curses to emit wide characters. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Eddie Kohler <ekohler@gmail.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190311135127.2229-3-samuel.thibault@ens-lyon.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
e08bb3010c
commit
2f8b7cd587
5
configure
vendored
5
configure
vendored
@@ -3496,14 +3496,17 @@ if test "$curses" != "no" ; then
|
||||
#include <locale.h>
|
||||
#include <curses.h>
|
||||
#include <wchar.h>
|
||||
#include <langinfo.h>
|
||||
int main(void) {
|
||||
const char *codeset;
|
||||
wchar_t wch = L'w';
|
||||
setlocale(LC_ALL, "");
|
||||
resize_term(0, 0);
|
||||
addwstr(L"wide chars\n");
|
||||
addnwstr(&wch, 1);
|
||||
add_wch(WACS_DEGREE);
|
||||
return 0;
|
||||
codeset = nl_langinfo(CODESET);
|
||||
return codeset != 0;
|
||||
}
|
||||
EOF
|
||||
IFS=:
|
||||
|
||||
Reference in New Issue
Block a user