Skip to content

Commit

Permalink
Suppress `Operation "lc" returns its argument for UTF-16 surrogate 0x…
Browse files Browse the repository at this point in the history
…NNNN` warning
  • Loading branch information
iafan committed Apr 10, 2017
1 parent 49ef686 commit 865402b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Serge/Engine/Plugin/Transform/case.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ sub name {

sub filter_key {
my ($self, $s) = @_;

# Suppress `Operation "lc" returns its argument for UTF-16 surrogate 0xNNNN` warning
# for the `lc()` call below; use 'utf8' instead of a more appropriate 'surrogate' pragma
# since the latter is not available in until Perl 5.14
no warnings 'utf8';

return lc($s); # lowercase the string
}

Expand Down

0 comments on commit 865402b

Please sign in to comment.