URL:
  <http://savannah.nongnu.org/bugs/?38191>

                 Summary: perl encoding hell
                 Project: WeeChat
            Submitted by: None
            Submitted on: Di 29 Jan 2013 10:23:24 UTC
                Category: script API plugins
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: [email protected]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.3.0
                IRC nick: Nei

    _______________________________________________________

Details:

it is annoying to use unicode from perl scripts because the weechat api
presents everything as byte[]

here's a sample script demonstrating the problem:


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
}






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?38191>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/weechat-dev

Reply via email to