perl-unicode

Encode anomalies (Was: [Encode] 1.00 released at last!)

2002-03-30 00:57:41
All the warnings below seem bogus to me.


    % /usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/bin/perl -wle '
    use Encode qw(from_to);
    $x = "\x{df}";                     
    from_to($x,"utf-8","iso8859-1");
    '
    Use of uninitialized value in subroutine entry at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 200.
    Use of uninitialized value in subroutine entry at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 200.


For the above I would expect something like "illegal character in
string".

    % /usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/bin/perl -wle '
    use Encode qw(from_to);
    $x = "\x{100}";
    from_to($x,"utf-8","iso8859-1");
    '
    Use of uninitialized value in subroutine entry at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 200.
    Use of uninitialized value in subroutine entry at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 200.

For the above I would expect no warning at all.


    % /usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/bin/perl -wle '
    use Encode qw(from_to);
    $x = Encode::encode_utf8("\x{100}");
    from_to($x,"utf-8","iso8859-1");
    '
    "\N{U+100}" does not map to iso-8859-1 at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 200.
    Use of uninitialized value in length at 
/usr/local/perl-5(_dot_)7(_dot_)3(_at_)15620/lib/5.7.3/i686-linux-thread-multi/Encode.pm
 line 202.


The \N{U+HHHH} notation is retracted since patch 9025. The warning
about length() makes no sense at all.


-- 
andreas

<Prev in Thread] Current Thread [Next in Thread>