Feature #5600
open
Inability to handle binary data
Added by JD Byrnes about 2 years ago.
Updated about 2 years ago.
Description
As AdiIRC doesn't support /parseline -uN
(TODO: Parseline), it's apparent there's no way to receive raw data from the server without AdiIRC messing it up encoding it.
For now, the workaround I'm using involves using sockets as an intermediate, as the only way I could receive raw data from the server was to /sockread to an &binvar
Additionally, using the &bvar(&binvar).text property will encode it too (bug?)
Am I missing something? I have it working, but it's an incredibly painful workaround.
You might be able to use $rawbytes in on PARSELINE, haven't tested it though so not sure.
-u will be added at some point, requires some bigger rewrites.
$bvar().text does UTF8 decode, same as mirc.
For getting non UTF8 decoded text out of $bvar(), I suggest asking maroon or talon on #adiirc, they might have an idea.
Unfortunately in my testing $rawbytes was $null in the on PARSELINE event.
You're right about mIRC, sorry.
The best I could come up with...
alias -l bvar2text { var %i 1, %r "" | while (%i <= $bvar($1, 0)) { %r = $qt($+($mid(%r, 2, $calc($len(%r) - 2)), $chr($bvar($1, %i)))) | inc %i } | returnex $mid(%r, 2, $calc($len(%r) - 2)) }
...half of the effort was preserving spaces.
Not sure if it helps in this case, but adiirc has as /!& prefix to evaluate only the last %variable to keep spaces in that variable.
I'll see if I can come up with something that prevents encoding UTF8 for on PARSELINE, maybe a temporary variable for now.
Per Amundsen wrote in #note-3:
Not sure if it helps in this case, but adiirc has as /!& prefix to evaluate only the last %variable to keep spaces in that variable.
I managed to preserve spaces with the above alias, but that's just a side effect of having to proxy via /socklisten and /sockopen
I'll see if I can come up with something that prevents encoding UTF8 for on PARSELINE, maybe a temporary variable for now.
This would be enough for me to connect directly to the server directly with AdiIRC, even if the raw data was stored in an &binvar.
Also available in: Atom
PDF