]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Fix UTF-8 encoding problem
authorThomas B. Ruecker <redacted>
Tue, 30 Jun 2015 12:00:46 +0000 (12:00 +0000)
committerThomas B. Ruecker <redacted>
Tue, 30 Jun 2015 12:00:46 +0000 (12:00 +0000)
scripts/xmpp-notify.pl

index bd0ecc70184a7e06aa2c11fe5a170f762e174254..18f43a19be0d85386df84aed9234afe629f0e599 100644 (file)
@@ -176,8 +176,8 @@ sub sig_message_private ($$$$) {
   if ((Irssi::settings_get_bool('xmpp_reveal_privmsg'))) {
     $body = '(PM: '.$nick.') '.$data;
   }
-  utf8::decode($body);
   $body = Irssi::strip_codes($body);
+  utf8::decode($body);
   $message->SetMessage(to=>$XMPPRecv);
   $message->SetMessage(
     type=>"chat",
@@ -194,8 +194,8 @@ sub sig_print_text ($$$) {
   if ($dest->{level} & MSGLEVEL_HILIGHT) {
     my $message = new Net::Jabber::Message();
     my $body = '['.$dest->{target}.'] '.$stripped;
-    utf8::decode($body);
     $body = Irssi::strip_codes($body);
+    utf8::decode($body);
     $message->SetMessage(to=>$XMPPRecv);
     $message->SetMessage(
       type=>"chat",
@@ -239,8 +239,8 @@ sub sig_message_topic {
 
   my $message = new Net::Jabber::Message();
   my $body = 'Topic for '.$channel.': '.$topic;
-  utf8::decode($body);
   $body = Irssi::strip_codes($body);
+  utf8::decode($body);
   $message->SetMessage(to=>$XMPPRecv);
   $message->SetMessage(
     type=>"chat",
git clone https://git.99rst.org/PROJECT