weechat::register('utf8', 'Nei <anti.teamidiot.de>', '0.0', 'GPL3', 'demo utf8 bug in perl api (/utf8a and /utf8b)', '', '') || return;
weechat::hook_command('utf8a', 'bug visible when error prefix is set to unicode char', '', '', '', 'utf8a_cmd', '');
weechat::hook_command('utf8b', 'bug visible when argument is unicode char', '[text]', '', '', 'utf8b_cmd', '');

sub utf8a_cmd {
	weechat::print('', weechat::prefix('error')."bug when prefix_error is unicode: \x{4f60}\x{597d} (hello in chinese)");
	weechat::WEECHAT_RC_OK
}

sub utf8b_cmd {
	weechat::print('', "bug when argument is unicode: \x{4f60}\x{597d} (hello in chinese). your argument was:".$_[2]);
	weechat::WEECHAT_RC_OK
}
