summaryrefslogtreecommitdiff
path: root/NetWare
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-08-26 16:29:54 -0600
committerKarl Williamson <khw@cpan.org>2016-08-31 20:32:37 -0600
commit35f8c9bd0ff4f298f8bc09ae9848a14a9667a95a (patch)
tree2d3a60c10c7a5b9e8f379eb4389f44e8c64a1195 /NetWare
parenteda91ad75c71796ed6c5d3da7850b2fd7566c2a2 (diff)
downloadperl-35f8c9bd0ff4f298f8bc09ae9848a14a9667a95a.tar.gz
Move isUTF8_CHAR helper function, and reimplement it
The macro isUTF8_CHAR calls a helper function for code points higher than it can handle. That function had been an inlined wrapper around utf8n_to_uvchr(). The function has been rewritten to not call utf8n_to_uvchr(), so it is now too big to be effectively inlined. Instead, it implements a faster method of checking the validity of the UTF-8 without having to decode it. It just checks for valid syntax and now knows where the few discontinuities are in UTF-8 where overlongs can occur, and uses a string compare to verify that overflow won't occur. As a result this is now a pure function. This also causes a previously generated deprecation warning to not be, because in printing UTF-8, no longer does it have to be converted to internal form. I could add a check for that, but I think it's best not to. If you manipulated what is getting printed in any way, the deprecation message will already have been raised. This commit also fleshes out the documentation of isUTF8_CHAR.
Diffstat (limited to 'NetWare')
0 files changed, 0 insertions, 0 deletions