mirror of
https://git.shylie.info/shylie/terml.git
synced 2024-11-21 15:40:07 +00:00
linux: set console codepage to UTF8
This commit is contained in:
parent
a6a2141049
commit
520f6c6625
@ -243,6 +243,7 @@ void terml::set_console_settings()
|
|||||||
{
|
{
|
||||||
setvbuf(stdout, nullptr, _IOFBF, BUFSIZ * BUFSIZ);
|
setvbuf(stdout, nullptr, _IOFBF, BUFSIZ * BUFSIZ);
|
||||||
printf(ALT_BUF() HIDE_CURSOR());
|
printf(ALT_BUF() HIDE_CURSOR());
|
||||||
|
printf(SELECT_UTF8());
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
set_console_settings_impl();
|
set_console_settings_impl();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#define HIDE_CURSOR() CSI "?25l"
|
#define HIDE_CURSOR() CSI "?25l"
|
||||||
#define SHOW_CURSOR() CSI "?25h"
|
#define SHOW_CURSOR() CSI "?25h"
|
||||||
|
#define SELECT_UTF8() CSI "%G"
|
||||||
|
|
||||||
#define REPORT_CUSROR_POSITION() CSI "6n"
|
#define REPORT_CUSROR_POSITION() CSI "6n"
|
||||||
#define CURSOR_POSITION_FORMAT() "%*1s[%u;%u"
|
#define CURSOR_POSITION_FORMAT() "%*1s[%u;%u"
|
||||||
|
Loading…
Reference in New Issue
Block a user