projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
RESENT - [PATCH] utf8_heavy.pl
[p5sagit/p5-mst-13.2.git]
/
utf8.c
diff --git
a/utf8.c
b/utf8.c
index
75226ca
..
f21b13c
100644
(file)
--- a/
utf8.c
+++ b/
utf8.c
@@
-68,6
+68,8
@@
Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
return d;
}
if (uv < 0x10000) {
+ if (UNICODE_IS_SURROGATE(uv))
+ Perl_croak(aTHX_ "UTF-16 surrogate 0x%04"UVxf, uv);
*d++ = (( uv >> 12) | 0xe0);
*d++ = (((uv >> 6) & 0x3f) | 0x80);
*d++ = (( uv & 0x3f) | 0x80);