'length' function now measures string length in codepoints, not bytes.

This commit is contained in:
Stephen Dolan committed 2013-05-15 00:37:38 +01:00
1 parent c496a924ce
commit e83e51eb56
9 files changed
+29 -17

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@ static void process(jv value, int flags) {
jv result;
while (jv_is_valid(result = jq_next(jq))) {
if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) {
fwrite(jv_string_value(result), 1, jv_string_length(jv_copy(result)), stdout);
fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout);
jv_free(result);
} else {
int dumpopts;