Re: "use utf8" in Locale::Maketext
[email protected] ((PerlDiscuss - Perl Newsgroups and mailing lists)) 31 Jul 2003 20:04:18 -0000
| Newsgroups | perl.i18n |
|---|---|
| Organization | PerlDiscuss.com |
| Message-ID | <[email protected]> |
Richard Evans wrote:
> Sean M. Burke wrote:
> > Jouke Visser, a fellow Locale::Maketext user, pointed out that if I added
> > a "use utf8" to Maketext.pm, it would fix Maketext's dealings with utf8
> > data.
> >
> > Would anyone object if I went and added the "use utf8;" to the start of
> > Maketext.pm? Clearly the problem would be that users with Perls
> > pre-dating utf8.pm wouldn't be able to use Maketext then.
> >
> > I figure since this list has (I think) several people responsible for
> > Maketext-based systems, it's a good place to talk about this.
> > --
> > Sean M. Burke http://search.cpan.org/~sburke/
> Hi Sean,
> I've had exactly this problem with the DateTime::Locale stuff I'm doing.
> Having talked to a few folks about it, the answer was actually dead simple:
> BEGIN
> {
> return unless $] >= 5.006;
> require utf8; "utf8"->import;
> }
> I've tested it with perl 5.8, 5.6 and a 5.5 nsperl (can't remember the exact
> release off hand).
> Cheers,
> Rich