It did so already except when passed a zero length input on
non-debugging builds. This caused test failures in Devel::PPPort, and
commit
4a5ab54a18679ab24ca03190884d326c2ca85288 was used to customize
that module in blead to get the tests to pass.
This commit avoids the possibility of having to bump the version again,
which is what that commit did.
assert(s < send);
if (! ckWARN_d(WARN_UTF8)) {
+
+ /* EMPTY is not really allowed, and asserts on debugging builds. But
+ * on non-debugging we have to deal with it, and this causes it to
+ * return the REPLACEMENT CHARACTER, as the documentation indicates */
return utf8n_to_uvchr(s, send - s, retlen,
- (UTF8_ALLOW_ANY & ~UTF8_ALLOW_EMPTY));
+ (UTF8_ALLOW_ANY | UTF8_ALLOW_EMPTY));
}
else {
UV ret = utf8n_to_uvchr(s, send - s, retlen, 0);