From c2568c171065a04911b4cae17a1adf471ed2bd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 1 Jun 2017 11:06:16 +0200 Subject: vis: use more portable format string for wchar_t Use upper case Unicode (U+XXXX) notation for `ga`. Fix #568 --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 3fec735..11ec217 100644 --- a/main.c +++ b/main.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -2004,7 +2005,7 @@ static const char *unicode_info(Vis *vis, const char *keys, const Arg *arg) { else buffer_appendf(&info, "<%s%.*s> ", combining ? " " : "", (int)len, codepoint); if (arg->i == VIS_ACTION_UNICODE_INFO) { - buffer_appendf(&info, "U+%04x ", wc); + buffer_appendf(&info, "U+%04"PRIX32" ", (uint32_t)wc); } else { for (size_t i = 0; i < len; i++) buffer_appendf(&info, "%02x ", (uint8_t)codepoint[i]); -- cgit v1.2.3