Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reclosing utf8 can of worms?

0 views
Skip to first unread message

Yitzchak Scott-Thoennes

unread,
Mar 16, 2004, 11:45:00 PM3/16/04
to perl5-...@perl.org
It sounds like the pressing issues have beginnings of answers now:

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?

Autrijus Tang

unread,
Mar 17, 2004, 1:59:08 AM3/17/04
to Yitzchak Scott-Thoennes, perl5-...@perl.org
On Tue, Mar 16, 2004 at 08:45:00PM -0800, Yitzchak Scott-Thoennes wrote:
> 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.)

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/

Rafael Garcia-Suarez

unread,
Mar 17, 2004, 2:07:51 AM3/17/04
to Autrijus Tang, Yitzchak Scott-Thoennes, perl5-...@perl.org
Autrijus Tang wrote:
>
> On Tue, Mar 16, 2004 at 08:45:00PM -0800, Yitzchak Scott-Thoennes wrote:
> > 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.)
>
> My goal is to make it into a genuine warning, that can be enabled
> or disabled lexically with:
>
> use warnings 'utf8';
> no warnings 'utf8';

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')

Yitzchak Scott-Thoennes

unread,
Mar 17, 2004, 3:04:54 PM3/17/04
to Rafael Garcia-Suarez, Autrijus Tang, perl5-...@perl.org
On Wed, Mar 17, 2004 at 08:07:51AM +0100, Rafael Garcia-Suarez <rgarci...@free.fr> wrote:
> Autrijus Tang wrote:
> >
> > On Tue, Mar 16, 2004 at 08:45:00PM -0800, Yitzchak Scott-Thoennes wrote:
> > > 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.)
> >
> > My goal is to make it into a genuine warning, that can be enabled
> > or disabled lexically with:
> >
> > use warnings 'utf8';
> > no warnings 'utf8';
>
> I think that's a good idea.

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"> :)

0 new messages