secret
Created

  • Download Gist
test.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
use strict;
use warnings;
 
my %SCRIPT = (
name => 'test',
author => 'stfn <stfnmd@gmail.com>',
version => '0.1',
license => 'GPL3',
desc => 'Test script to demonstrate U+200B problem',
);
 
weechat::register($SCRIPT{"name"}, $SCRIPT{"author"}, $SCRIPT{"version"}, $SCRIPT{"license"}, $SCRIPT{"desc"}, "", "");
weechat::hook_command($SCRIPT{"name"}, $SCRIPT{"desc"}, "", "", "", "command_cb", "");
 
# '/test' command
sub command_cb
{
my $buffer = $_[0];
 
# The test message below fails, the "OK" part never shows up in weechat.
# Though the log file written by the logger plugin contains the correct
# and complete message.
weechat::command($buffer, "Test: \x{200B} OK");
 
return weechat::WEECHAT_RC_OK;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.