/* utf8.c
*
- * Copyright (c) 1998-2002, Larry Wall
+ * Copyright (c) 1998-2003, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
/*
=for apidoc A|bool|is_utf8_string|U8 *s|STRLEN len
-Returns true if first C<len> bytes of the given string form a valid UTF8
-string, false otherwise. Note that 'a valid UTF8 string' does not mean
-'a string that contains UTF8' because a valid ASCII string is a valid
-UTF8 string.
+Returns true if first C<len> bytes of the given string form a valid
+UTF8 string, false otherwise. Note that 'a valid UTF8 string' does
+not mean 'a string that contains code points above 0x7F encoded in
+UTF8' because a valid ASCII string is a valid UTF8 string.
=cut
*/
Returns a pointer to the newly-created string, and sets C<len> to
reflect the new length.
+If you want to convert to UTF8 from other encodings than ASCII,
+see sv_recode_to_utf8().
+
=cut
*/
}
if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
if (SvPOK(retval))
- Perl_croak(aTHX_ "Can't find Unicode property definition \"%s\"",
- SvPV_nolen(retval));
+ Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"",
+ retval);
Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
}
return retval;