Handle cut-off UTF-8 sequences when reading files 1317/head
authorWilliam Langford <wlangfor@gmail.com>
Wed, 25 Jan 2017 04:05:47 +0000 (23:05 -0500)
committerWilliam Langford <wlangfor@gmail.com>
Sat, 28 Jan 2017 02:04:26 +0000 (21:04 -0500)
commite84d17196c03da6e6dc56f4fcd319a7fe84f8dbc
treea69bd988a82c256dbeb78c045137e08b1da55325
parentfd4ae8304e23007672af9a37855c7a76de7c78cf
Handle cut-off UTF-8 sequences when reading files

Read additional bytes from the file to complete the UTF-8 sequence so the bytes
in it don't get converted to U+FFFD replacement characters.
Makefile.am
src/jv_file.c
src/jv_unicode.c
src/jv_unicode.h
tests/jq.test
tests/utf8-truncate.jq [new file with mode: 0644]
tests/utf8test [new file with mode: 0755]