Project

General

Profile

Actions

Feature #5600

open

Inability to handle binary data

Added by JD Byrnes 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
07/18/2022
Due date:
% Done:

0%

Estimated time:
Operative System:
All

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.

Actions #1

Updated by Per Amundsen 4 months ago

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.

Actions #2

Updated by JD Byrnes 4 months ago

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.

Actions #3

Updated by Per Amundsen 4 months ago

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.

Actions #5

Updated by JD Byrnes 4 months ago

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.

Actions

Also available in: Atom PDF