Merge pull request #92 from Herringway/bmp-fix
Fix issue #79: Support for non-BMP Unicode characters merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
commit
0784ca63ec
|
@ -926,7 +926,8 @@ bool isPrintableValidUTF8(const char[] chars) @trusted pure nothrow @nogc
|
|||
const dchar c = decodeValidUTF8NoGC(chars, index);
|
||||
// We now c is not ASCII, so only check for printable non-ASCII chars.
|
||||
if(!(c == 0x85 || (c >= 0xA0 && c <= '\uD7FF') ||
|
||||
(c >= '\uE000' && c <= '\uFFFD')))
|
||||
(c >= '\uE000' && c <= '\uFFFD') ||
|
||||
(c >= '\U00010000' && c <= '\U0010FFFF')))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
6
test/data/bmpchars.canonical
Normal file
6
test/data/bmpchars.canonical
Normal file
|
@ -0,0 +1,6 @@
|
|||
%YAML 1.1
|
||||
---
|
||||
!!map {
|
||||
? !!str "a"
|
||||
: !!str "𒅗"
|
||||
}
|
1
test/data/bmpchars.data
Normal file
1
test/data/bmpchars.data
Normal file
|
@ -0,0 +1 @@
|
|||
a: 𒅗
|
Loading…
Reference in a new issue