From: Jarkko Hietaniemi Date: Mon, 18 Mar 2002 13:24:03 +0000 (+0000) Subject: Integrate perlio: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0ee0454c18392950628d74b40505290964b1298;p=p5sagit%2Fp5-mst-13.2.git Integrate perlio: [ 15282] Tidy the "does not map" message for non-characters (e.g. iso-8859-3 "\xA5"). p4raw-link: @15282 on //depot/perlio: 413c4af61642c148a716a68d14bb8cc3c5573f63 p4raw-id: //depot/perl@15285 p4raw-integrated: from //depot/perlio@15283 'copy in' ext/Encode/Encode.xs (@15274..) --- diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index bf2fd51..a71f69b 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -555,10 +555,12 @@ encode_method(pTHX_ encode_t * enc, encpage_t * dir, SV * src, } } else { - /* UTF-8 is supposed to be "Universal" so should not happen */ - Perl_croak(aTHX_ "%s '%.*s' does not map to UTF-8", - enc->name[0], (int) (SvCUR(src) - slen), - s + slen); + /* UTF-8 is supposed to be "Universal" so should not happen + for real characters, but some encodings have non-assigned + codes which may occur. + */ + Perl_croak(aTHX_ "%s \"\\x%02X\" does not map to Unicode", + enc->name[0], (U8) s[slen]); } break;