aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/n3.c9
-rw-r--r--src/node.c5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/n3.c b/src/n3.c
index a6250401..0098e5a1 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -623,8 +623,11 @@ read_IRIREF_scheme(SerdReader* reader, Ref dest)
if (c == '>') {
return r_err(reader, SERD_ERR_BAD_SYNTAX, "missing IRI scheme\n");
} else if (!is_uri_scheme_char(c)) {
- return r_err(reader, SERD_ERR_BAD_SYNTAX,
- "bad IRI scheme char `%X'\n", c);
+ return r_err(reader,
+ SERD_ERR_BAD_SYNTAX,
+ "bad IRI scheme char U+%04X (%c)\n",
+ (unsigned)c,
+ (char)c);
}
push_byte(reader, dest, eat_byte_safe(reader, c));
@@ -664,7 +667,7 @@ read_IRIREF(SerdReader* reader)
switch (code) {
case 0: case ' ': case '<': case '>':
r_err(reader, SERD_ERR_BAD_SYNTAX,
- "invalid escaped IRI character %X %c\n", code, code);
+ "invalid escaped IRI character U+%04X\n", code);
return pop_node(reader, ref);
default:
break;
diff --git a/src/node.c b/src/node.c
index 5a84237d..ea9168bd 100644
--- a/src/node.c
+++ b/src/node.c
@@ -191,7 +191,10 @@ serd_node_new_file_uri(const uint8_t* path,
serd_chunk_sink(path + i, 1, &chunk);
} else {
char escape_str[4] = { '%', 0, 0, 0 };
- snprintf(escape_str + 1, sizeof(escape_str) - 1, "%X", path[i]);
+ snprintf(escape_str + 1,
+ sizeof(escape_str) - 1,
+ "%X",
+ (unsigned)path[i]);
serd_chunk_sink(escape_str, 3, &chunk);
}
}