title: storing javascript character in one byte
body: <p>I have to send data to a connected object one byte chars. So I convert integer data to <code>ASCII</code> with the help of <code>String.fromCharCode()</code>. </p>
  
  <p>As long as the integer is less than 127, then the caracter is stored in one byte. But beyond 128, which is normal, the data consists in more than one byte. </p>
  
  <p>How can I deal with that ? </p>
  
  <p>For sure I checked the number of <code>bytes</code> using <code>encodeURI(s).split(/%..|./).length - 1</code></p>
  
  <p>I tried this SO <a href="https://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array">post</a> but it did not help much</p>