More Unicode Fun
From Philip Taylor (via Henri Sivonen): disallow U+fffe and U+ffff.
This commit is contained in:
parent
14e3728183
commit
c8196cbe41
|
@ -133,7 +133,9 @@ class String
|
||||||
[\x09\x0A\x0D\x20-\x7E] # ASCII
|
[\x09\x0A\x0D\x20-\x7E] # ASCII
|
||||||
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|
||||||
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
|
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
|
||||||
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
|
| [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte
|
||||||
|
| \xEF[\x80-\xBE]{2} #
|
||||||
|
| \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff
|
||||||
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
|
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
|
||||||
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
|
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
|
||||||
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
|
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
|
||||||
|
|
Loading…
Reference in a new issue