weechat-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [bug #38191] perl encoding hell


From: anonymous
Subject: [Weechat-dev] [bug #38191] perl encoding hell
Date: Tue, 29 Jan 2013 10:23:24 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 conkeror/1.0pre

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: address@hidden
             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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]