Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-23 Thread Robert Allerstorfer
Dear Autrijus, On Sun, 22 Sep 2002, 11:06 GMT+08 Autrijus Tang wrote: > Incidentally I have just finished a skeleton of Encode::compat, named > after Apache::compat (lower case) since it's a 'pragma' for Encode > usage, instead of a subcomponent of Encode. > It is available on CPAN, or at: >

Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-23 Thread Robert Allerstorfer
Autrijus, I just realized that your compat.pm is completely OK to work with 5.8 and I have not to replace 'use Encode;' by 'use Encode::compat;' but add the latter before 'use Encode;'. -- rob.

Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-22 Thread Autrijus Tang
On Sun, Sep 22, 2002 at 08:32:08PM +0200, Robert Allerstorfer wrote: > > The usage is: > > use Encode::compat; # a no-op for Perl v5.7.1+ use Encode qw(...); ^^^ I'm sorry for the confusion caused by a missing \n in the mai

Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-21 Thread Jarkko Hietaniemi
> > and if all else fails one can do at least the Latin-1 <-> UTF-8 byte > > level conversion rather trivially with the: > > > > s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg; > > s/([\xC2\xC3])([\x80-\xBF])/chr(ord($1)<<6&0xC0|ord($2)&0x3F)/eg; > > Cool algorithmic hack

Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-21 Thread Autrijus Tang
On Sun, Sep 22, 2002 at 06:19:21AM +0300, Jarkko Hietaniemi wrote: > If one has the GNU recode installed one can also fall back to > Convert::Recode. Thus noted. Thanks! > and if all else fails one can do at least the Latin-1 <-> UTF-8 byte > level conversion rather trivially with the: > >

Re: Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-21 Thread Jarkko Hietaniemi
On Sun, Sep 22, 2002 at 11:06:27AM +0800, Autrijus Tang wrote: > Dan san, > > > a) if it uses 'Encode' as module name it needs to work both in 5.8 > > and 5.6.1. Bottom line is that backported version will not breach > > what it is now. If it ain't broke, don't fix it (and 5.6.1 was > >

Encode::compat (was Re: Encode functionality for Perl 5.6.1)

2002-09-21 Thread Autrijus Tang
Dan san, > a) if it uses 'Encode' as module name it needs to work both in 5.8 > and 5.6.1. Bottom line is that backported version will not breach > what it is now. If it ain't broke, don't fix it (and 5.6.1 was > broke Unicode-wise) b) if you just implemented Encode functionality > in

Re: Encode functionality for Perl 5.6.1

2002-09-21 Thread SADAHIRO Tomoyuki
On Sat, 21 Sep 2002 15:38:31 +0200 Robert Allerstorfer <[EMAIL PROTECTED]> wrote: > Hi, > > the great Encode module requires perl 5.8. Are there > any backports existing yet that may work with 5.6.1? I am trying to > find a solution to encode Japanese (shiftjis) and Chinese (gb2312 > and big5)

Re: Encode functionality for Perl 5.6.1

2002-09-21 Thread Dan Kogai
On Saturday, Sep 21, 2002, at 22:38 Asia/Tokyo, Robert Allerstorfer wrote: > Hi, > > the great Encode module requires perl 5.8. Are there > any backports existing yet that may work with 5.6.1? I am trying to > find a solution to encode Japanese (shiftjis) and Chinese (gb2312 > and big5) into utf8

Re: Encode functionality for Perl 5.6.1

2002-09-21 Thread Autrijus Tang
On Sat, Sep 21, 2002 at 03:38:31PM +0200, Robert Allerstorfer wrote: > the great Encode module requires perl 5.8. Are there > any backports existing yet that may work with 5.6.1? I am trying to > find a solution to encode Japanese (shiftjis) and Chinese (gb2312 > and big5) into utf8 with that perl

Encode functionality for Perl 5.6.1

2002-09-21 Thread Robert Allerstorfer
Hi, the great Encode module requires perl 5.8. Are there any backports existing yet that may work with 5.6.1? I am trying to find a solution to encode Japanese (shiftjis) and Chinese (gb2312 and big5) into utf8 with that perl version since 5.8 is not yet used widely, unfortunately. Thanks for su