diff options
-rw-r--r-- | src/error.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/error.h b/src/error.h index 03af66c..0db6caa 100644 --- a/src/error.h +++ b/src/error.h @@ -64,8 +64,10 @@ typedef enum { static inline void teco_error_syntax_set(GError **error, gunichar chr) { + gchar buf[6]; + g_autofree gchar *chr_printable = teco_string_echo(buf, g_unichar_to_utf8(chr, buf)); g_set_error(error, TECO_ERROR, TECO_ERROR_SYNTAX, - "Syntax error \"%C\" (U+%04" G_GINT32_MODIFIER "X)", chr, chr); + "Syntax error \"%s\" (U+%04" G_GINT32_MODIFIER "X)", chr_printable, chr); } static inline void |