Skip to content

Commit

Permalink
Merge pull request #5 from alexrj/utf8-encode
Browse files Browse the repository at this point in the history
Use utf8::encode() instead of utf8::downgrade()
  • Loading branch information
rjray committed Feb 5, 2014
2 parents 10b4ccc + 0379d06 commit c00cd56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/RPC/XML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ sub length ## no critic (ProhibitBuiltinHomonyms)
{
my $self = shift;

utf8::downgrade(my $str = $self->as_string);
utf8::encode(my $str = $self->as_string);

return length $str;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/RPC/XML/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ sub send_request ## no critic (ProhibitExcessComplexity)
else
{
# Treat the content strictly in-memory
utf8::downgrade($content = $req->as_string);
utf8::encode($content = $req->as_string);
if ($do_compress)
{
$content = Compress::Zlib::compress($content);
Expand Down

0 comments on commit c00cd56

Please sign in to comment.