From cfbf51716613dfee30f22451589fbb7f8978b7fb Mon Sep 17 00:00:00 2001 From: Taro Kobayashi <9re.3000@gmail.com> Date: Thu, 7 Feb 2013 15:37:27 +0900 Subject: [PATCH] ignore only 0x00-0x19 to support utf-8 characters --- parson.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parson.c b/parson.c index 38617e6..6e01a87 100644 --- a/parson.c +++ b/parson.c @@ -331,8 +331,7 @@ static const char * get_processed_string(const char **string) { return NULL; break; } - } else if (iscntrl((unsigned char)current_char) && - ((unsigned char)current_char != 0x7F)) { /* no control characters allowed (except DEL)*/ + } else if ((unsigned char)current_char < 0x20) { /* 0x00-0x19 are invalid characters for json string (http://www.ietf.org/rfc/rfc4627.txt) */ parson_free(output); return NULL; }