Upgrades due to mere proximity to utf8 data should be treated as bugs
and fixed.
Other upgrades without encoding specified can be made to issue a
warning or die via encoding::warnings, which IMO should be added to
the core (in blead and maint). (I feel that perl warning by default
breaks backward compatibility more than the existing problems. Others
feel differently.)
XS that expects utf8 needs a typemap/api funcion to do a copy&upgrade
as needed. Said api function should be in Devel::PPPort also.
Does that cover it?
My goal is to make it into a genuine warning, that can be enabled
or disabled lexically with:
use warnings 'utf8';
no warnings 'utf8';
And by extension, I feel that "perl -w" ought to enable this warning.
Thanks,
/Autrijus/
I think that's a good idea.
However, I don't understand (yet) how your module works;
and anyway, if the encoding pragma becomes lexically scoped
in 5.9.2, I expect ${^ENCODING} to be lexically scoped as well,
which will break your module. No ?
(however, for compatibility reasons, perl 5.9.2 could provide
an encoding::warnings pragma alias to warnings 'utf8')
I'd appreciate a different warning category, as the existing warnings
there may still be wanted without having the new one. 'upgrade'? (Or
maybe new subcategories for the existing ones; 'malformed', and
'wideio'??)
Or maybe I need to just get used to saying C<use encoding "iso-8859-1"> :)