Skip to content

Commit

Permalink
add hadling normaln characters
Browse files Browse the repository at this point in the history
  • Loading branch information
sergot committed Jul 17, 2014
1 parent 20bfab9 commit c3e299a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Encode.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ our sub decode($encoding, buf8 $buf) {
}

sub latin2(buf8 $buf) {
$buf.list.map({ %Encode::Latin2::map{$_} });
$buf.list.map({ %Encode::Latin2::map{$_} // $_ });
}
3 changes: 2 additions & 1 deletion t/01-latin2.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use Encode;

use Test;

plan 1;
plan 2;

is Encode::decode('iso-8859-2', buf8.new(0xa3))>>.chr.join, 'Ł', 'decode';
is Encode::decode('iso-8859-2', buf8.new(76))>>.chr.join, 'L', 'decode';

0 comments on commit c3e299a

Please sign in to comment.