Changeset 0c4a190 for perl


Ignore:
Timestamp:
Oct 3, 2009, 8:45:52 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
82a79a6
Parents:
39e81f7
git-author:
Nelson Elhage <nelhage@mit.edu> (10/02/09 23:14:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (10/03/09 20:45:52)
Message:
IRC: Encode outgoing messages as utf-8.

I believe this closes #87. It's possible in the future we'll want a
way to use a different encoding, but I believe IRC has largely
standardized on utf-8, at least insofar as anyone uses non-ASCII.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    r744769e r0c4a190  
    399399    $body =~ tr/\n\r/  /;
    400400    if ($body =~ /^\/me (.*)/) {
    401         $conn->conn->me($to, $1);
     401        $conn->conn->me($to, Encode::encode('utf-8', $1));
    402402        $body = '* '.$conn->nick.' '.$1;
    403403    } else {
    404         $conn->conn->privmsg($to, $body);
     404        $conn->conn->privmsg($to, Encode::encode('utf-8', $body));
    405405    }
    406406    my $msg = BarnOwl::Message->new(
Note: See TracChangeset for help on using the changeset viewer.