title: vbscript: convert unicode string to array of bytes
body: <p>I have unicode string passed to vbscript procedure (not visual basic 6, but vbscript). I want to iterate unicode string char by char, get code for every symbol, truncate code to byte range [0..255] and create array of bytes. </p>
  
  <p>This way new array of bytes should be twice smaller in memory compared to original unicode string. I am going save this array to file via <a href="http://www.motobit.com/tips/detpg_read-write-binary-files/" rel="nofollow noreferrer">ADODB.Stream</a> object further</p>
  
  <p>How can I convert unicode string to bytes array with symbol code truncated to byte range? </p>
  
  <p>Thank you in advance! </p>