Menu

#4 Some Unicode cause Parse Error

closed-fixed
None
5
2009-03-24
2009-03-24
No

1151 case 3: /*inside a JSON string: escape unicode */
1152 {
1153 assert (*text != NULL);
1154 if ((**p >= 'a') && (**p <= 'e'))
1155 {
1156 if (rcs_catc (*text, **p) != RS_OK)
1157 return LEX_MEMORY;
1158 *state = 4; /* inside a JSON string: escape unicode */
1159 }
1160 else if ((**p >= 'A') && (**p <= 'E'))
1161 {
1162 if (rcs_catc (*text, **p) != RS_OK)
1163 return LEX_MEMORY;
1164 *state = 4; /* inside a JSON string: escape unicode */
1165 }

I am not sure why here **p is compared to 'e' and 'E' but not 'f' and 'F'. My json document contains a unicode 'ò' \u00F2, the parser will return error.

Discussion

  • Anonymous

    Anonymous - 2009-03-24

    Thanks for the bug report. You are absolutely right, **p should be compared to [fF] instead of [eE]. I've just commited a fix to the trunk.

     
  • Anonymous

    Anonymous - 2009-03-24
    • assigned_to: nobody --> rui_maciel
    • status: open --> closed-fixed
     

Log in to post a comment.