->BYTES
conversion
->BYTES function converts a string into a bytes array given a charset
and put the result on top of the stack.
Charset could be any supported by your java platform. Example: UTF-8 US-ASCII ISO-8859-1 Cp852...
Bytes array cannot be represented on the stack.
->BYTES is available since version 1.0.6.
See also
Signatures
Examples
//string conversion
'Московский аэропорт' 'utf-8' ->BYTES 'airport' STORE //moscow airport
$airport 'US-ASCII' BYTES-> //bad idea
$airport 'cp850' BYTES-> //will look weird
$airport 'iso8859-1' BYTES-> //well, no.
$airport 'utf16' BYTES-> //definitely, no.
$airport ->HEX
'Московский аэропорт' SIZE //19 characters
'Московский аэропорт' 'utf-8' ->BYTES SIZE //37 bytes needed in utf8