@@ -7995,8 +7995,9 @@ PP(pp_multiparam)
79957995 val = svp ? * svp : & PL_sv_undef ;
79967996 }
79977997
7998+ /* namepv / namelen are always UTF-8 */
79987999 STRLEN namelen ;
7999- const char * namepv = SvPV (name , namelen );
8000+ const char * namepv = SvPVutf8 (name , namelen );
80008001
80018002 U32 namehash ;
80028003 PERL_HASH (namehash , namepv , namelen );
@@ -8059,8 +8060,8 @@ PP(pp_multiparam)
80598060 else {
80608061 // TODO: Consider collecting up all the names of unrecognised
80618062 // in one string
8062- croak_caller ("Unrecognized named parameter '%s ' to subroutine '%" SVf "'" ,
8063- namepv , S_find_runcv_name ());
8063+ croak_caller ("Unrecognized named parameter '%" UTF8f " ' to subroutine '%" SVf "'" ,
8064+ UTF8fARG (true, namelen , namepv ) , S_find_runcv_name ());
80648065 }
80658066 }
80668067
@@ -8071,8 +8072,8 @@ PP(pp_multiparam)
80718072
80728073 // TODO: Consider collecting up all the names of missing
80738074 // parameters in one string
8074- croak_caller ("Missing required named parameter '%s ' to subroutine '%" SVf "'" ,
8075- named -> namepv , S_find_runcv_name ());
8075+ croak_caller ("Missing required named parameter '%" UTF8f " ' to subroutine '%" SVf "'" ,
8076+ UTF8fARG (true, named -> namelen , named -> namepv ) , S_find_runcv_name ());
80768077 }
80778078 }
80788079
0 commit comments