/[pcre]/code/trunk/pcre32_valid_utf32.c
ViewVC logotype

Diff of /code/trunk/pcre32_valid_utf32.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1088 by chpe, Tue Oct 16 15:55:41 2012 UTC revision 1098 by chpe, Tue Oct 16 15:56:18 2012 UTC
# Line 66  back in the returned value: Line 66  back in the returned value:
66    
67  PCRE_UTF32_ERR0  No error  PCRE_UTF32_ERR0  No error
68  PCRE_UTF32_ERR1  Surrogate character  PCRE_UTF32_ERR1  Surrogate character
69  PCRE_UTF32_ERR2  Disallowed character 0xfffe  PCRE_UTF32_ERR2  Non-character
70  PCRE_UTF32_ERR3  Character > 0x10ffff  PCRE_UTF32_ERR3  Character > 0x10ffff
71    
72  Arguments:  Arguments:
# Line 99  for (p = string; length-- > 0; p++) Line 99  for (p = string; length-- > 0; p++)
99      {      {
100      /* Normal UTF-32 code point. Neither high nor low surrogate. */      /* Normal UTF-32 code point. Neither high nor low surrogate. */
101    
102      /* This is probably a 16-bit BOM. Regardless, the string is rejected. */      /* Check for non-characters */
103      if (c == 0xfffeu)      if ((c & 0xfffeu) == 0xfffeu ||
104            c >= 0xfdd0u && c <= 0xfdefu)
105        {        {
106        *erroroffset = p - string;        *erroroffset = p - string;
107        return PCRE_UTF32_ERR2;        return PCRE_UTF32_ERR2;

Legend:
Removed from v.1088  
changed lines
  Added in v.1098

  ViewVC Help
Powered by ViewVC 1.1.5