Allow using non-ASCII format strings in Printf.

pull/200/merge
whitequark 2018-07-10 23:44:02 +00:00
parent 2b9ffd1542
commit 8cedefc278
2 changed files with 4 additions and 1 deletions

View File

@ -275,6 +275,7 @@ public:
utf8_iterator& operator++() { **this; p=n; n=NULL; return *this; } utf8_iterator& operator++() { **this; p=n; n=NULL; return *this; }
utf8_iterator operator++(int) { utf8_iterator t(*this); operator++(); return t; } utf8_iterator operator++(int) { utf8_iterator t(*this); operator++(); return t; }
char32_t operator*(); char32_t operator*();
const char* ptr() const { return p; }
}; };
class ReadUTF8 { class ReadUTF8 {
const std::string &str; const std::string &str;

View File

@ -445,7 +445,9 @@ void TextWindow::Printf(bool halfLine, const char *fmt, ...) {
} }
} }
fmt++; utf8_iterator it(fmt);
it++;
fmt = it.ptr();
} }
while(c < MAX_COLS) { while(c < MAX_COLS) {
meta[r][c].fg = fg; meta[r][c].fg = fg;