summaryrefslogtreecommitdiff
path: root/src/raptor_rdfxml.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2022-06-06 18:19:49 -0700
committerDave Beckett <dave@dajobe.org>2022-06-06 22:07:24 -0700
commit3cca62a33da68143b687c9e486eefc7c7cbb4586 (patch)
tree1d0fc6d5a5bbef9bf224a161671fbd316af702c4 /src/raptor_rdfxml.c
parent94a2bb5086db948d83a039fbe6852a6a47f9b588 (diff)
downloadraptor-3cca62a33da68143b687c9e486eefc7c7cbb4586.tar.gz
Fix internal ICU string NFC check to convert to UTF-16 firstt
(raptor_nfc_icu_check, raptor_unicode_check_utf8_nfc_string): Changed signature of these internal functions to not have error_p which wasn't even consistently used. Instead return -1 on failure which is also "falsey" in C. (raptor_nfc_icu_check): Do an UTF-8 (raptor) to UTF-16 conversion before trying to do a NFC normalization check. Update callers of above internal functions to remove error_p argument which was unused in all callers. Update rdfxmla tests to allow tests to throw warnings.
Diffstat (limited to 'src/raptor_rdfxml.c')
-rw-r--r--src/raptor_rdfxml.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/raptor_rdfxml.c b/src/raptor_rdfxml.c
index ce9f3931..2a742d0a 100644
--- a/src/raptor_rdfxml.c
+++ b/src/raptor_rdfxml.c
@@ -1396,8 +1396,7 @@ raptor_rdfxml_process_property_attributes(raptor_parser *rdf_parser,
}
- if(!raptor_unicode_check_utf8_nfc_string(value, strlen((const char*)value),
- NULL)) {
+ if(!raptor_unicode_check_utf8_nfc_string(value, strlen((const char*)value))) {
raptor_log_level l;
raptor_rdfxml_update_document_locator(rdf_parser);
@@ -1505,7 +1504,7 @@ raptor_rdfxml_process_property_attributes(raptor_parser *rdf_parser,
}
if(object_is_literal &&
- !raptor_unicode_check_utf8_nfc_string(value, value_len, NULL)) {
+ !raptor_unicode_check_utf8_nfc_string(value, value_len)) {
raptor_log_level l;
raptor_rdfxml_update_document_locator(rdf_parser);
@@ -2780,8 +2779,7 @@ raptor_rdfxml_end_element_grammar(raptor_parser *rdf_parser,
if(!literal_datatype && literal &&
!raptor_unicode_check_utf8_nfc_string(literal,
- xml_element->content_cdata_length,
- NULL)) {
+ xml_element->content_cdata_length)) {
raptor_log_level l;
raptor_rdfxml_update_document_locator(rdf_parser);
@@ -2836,7 +2834,7 @@ raptor_rdfxml_end_element_grammar(raptor_parser *rdf_parser,
length = xml_element->content_cdata_length;
}
- if(!raptor_unicode_check_utf8_nfc_string(buffer, length, NULL)) {
+ if(!raptor_unicode_check_utf8_nfc_string(buffer, length)) {
raptor_log_level l;
raptor_rdfxml_update_document_locator(rdf_parser);