Skip to content

Commit

Permalink
vis: use more portable format string for wchar_t
Browse files Browse the repository at this point in the history
Use upper case Unicode (U+XXXX) notation for `ga`.

Fix martanne#568
  • Loading branch information
martanne committed Jun 1, 2017
1 parent bd5f93d commit c2568c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>

Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit c2568c1

Please sign in to comment.