bugWeeChat - Bugs: bug #38191, perl encoding hell

 
 

bug #38191: perl encoding hell

Submitted by:  None
Submitted on:  Tue 29 Jan 2013 10:23:24 AM UTC  
 
Category: script API pluginsSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: OpenRelease: 0.3.0
IRC nick: Nei

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 29 Jan 2013 06:38:36 PM UTC, comment #2:

oh, and here is a brute force patch which declares everything as utf8 (and therefore obviously wrong) http://anti.teamidiot.de/static/nei//Code/WeeChat/always_utf8.diff

Anonymous
Tue 29 Jan 2013 10:29:06 AM UTC, comment #1:

from the api docs derives the following list of possibly non-utf8 data:

utf8* = iconv_to_internal charset, byte*string
byte* = iconv_from_internal charset, utf8*string
hook_process(_hashtable) callback (data, command, rc, byteout, byteerr) [maybe the out and err are not utf8?]

maybe some of the following hook_signal s:
,irc_in_ [?]
,irc_raw_in_ [?]
,irc_out(1)_ [?]

following hook_modifier s:
Plugin | Modifier | Modifier data | String | Output
[bytestring,utf8out[?]] charset | charset_decode | plugin.buffer_name | any string | string decoded from charset found for plugin/buffer to UTF-8
[utf8string,byteout[?]] charset | charset_encode | plugin.buffer_name | any string | string encoded from UTF-8 to charset found for plugin/buffer
[byte] irc | irc_in_xxx (1) | server name | content of message received from IRC server (before charset decoding) | new content of message
[should be fine] irc | irc_in2_xxx (1) | server name | content of message received from IRC server (after charset decoding) | new content of message
[?] irc | irc_out1_xxx (1)| server name | content of message about to be sent to IRC server (before automatic split to fit in 512 bytes) | new content of message
[should be bytes at this stage?] irc | irc_out_xxx (1) | server name | content of message about to be sent to IRC server (after automatic split to fit in 512 bytes) | new content of message

--> hook_modifier_exec is affected the same as hook_modifier

Anonymous
Tue 29 Jan 2013 10:23:24 AM UTC, original submission:

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:

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27341:  utf8.pl added by None (686B - application/x-perl - so much for "verbatim". script without missing letters attached)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 29 Jan 2013 10:24:52 AM UTCNoneAttached File-=>Added utf8.pl, #27341

    Back to the top


    Powered by Savane 3.1-cleanup