У меня проблема с печатью символов utf8 в режиме gdb -tui.
(gdb) show charset
The host character set is "auto; currently UTF-8".
The target character set is "auto; currently UTF-8".
The target wide character set is "auto; currently UTF-32".
код: tmp.cpp, utf8
#include <iostream>
int main() {
char *s = "asd";
char *w = "тест";
std::cout << s << std::endl;
std::cout << w << std::endl;
return 0;
}
g++ cmds:
g++ -O0 -g tmp.cpp
gdb cmds:
b 6
r
info locals
gdb stdout:
s = 0x80487b0 "asd"
w = 0x80487b4 "тест"
gdbtui stdout:
s = 0x80487b0 "asd"
w = 0x80487b4 "мама"
Скажите, пожалуйста, что мне делать, чтобы увидеть правильный результат?
Ctrl + L resolve this situation.