if the binvar doesn't contain invalid UTF-8 then $utfencode($binvar(&var, 1-).text) is enough to produce its string of bytes.

otherwise, as in the general case, you need to loop through all bytes with $bvar(&var, N) and handle them individually. there may be another way involving /bwrite + another feature of mIRC, but as far as I can remember (and i don't have mIRC to play around with at the moment :P) there is nothing you can use to pull the string from the file without decoding UTF-8 or putting it back in a binvar.

edit: you can of course use $regsubex($bvar(&var, 1-), /(\d+) ?/g, $chr(\1)) to return that string of byte values, as an alternative to (scripted) looping. due to mIRC's length limits, you will only be able to handle the bvar that way, in the worst case, in 1,037 byte sized chunks.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde