mIRC Home    About    Download    Register    News    Help

Topic Options
#264448 - 30/11/18 10:24 AM $decode(data,switch,N) ignores N
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1144
$decode(%var | &binvar, amubt, N)

$decode ignores the N chunk parameter. Both v7.52 and current version display in red the entire length 300, while v6.35 displays the red string as 016017018019020021022023024025026027028029030

//var %switch m , %original $regsubex($str(x,100),/x/g,$base(\n,10,10,3)) , %b $encode(%original,%switch) | echo 3 -a original: %original | echo -a encoded: %b | echo 4 -a $decode(%b,%switch,2)

#264450 - 30/11/18 10:42 AM Re: $decode(data,switch,N) ignores N [Re: maroon]
Khaled Offline

Planetary brain

Registered: 04/12/02
Posts: 4437
Loc: London, UK
Thanks for your bug report. This was actually an intentional change. Some scripters were decoding in chunks, which resulted in broken UTF-8 text. So newer versions of $decode() do not pay attention to the N. I will update the help file to reflect this.