title: Best way to convert arabic to hex in custom code table in c#
body: <p>I'm currently working on a new program to print receipts which contain arabic text. The printer can handle these characters, but uses a special code table to print them. Therefore all information sent to the printer must be in hex. Information sent to the printer can have a mix of both arabic and non arabic characters.</p>
  
  <p>The code table is here(page 133 <a href="http://support.epostraders.co.uk/support-files/documents/3/dwY-TM-T88V_TechRefGuide.pdf" rel="nofollow">http://support.epostraders.co.uk/support-files/documents/3/dwY-TM-T88V_TechRefGuide.pdf</a>)</p>
  
  <p>For example, ق = E7, ك = E8</p>
  
  <p>With a standard hex conversion (below) the first 128 latin alphanumeric characters work just fine, but arabic are displayed as question marks.</p>
  
  <pre><code>byte[] ba = Encoding.Default.GetBytes(textBox1.Text);
  var hexstring = BitConverter.ToString(ba);
  </code></pre>
  
  <p>Does anyone have any suggestions for the best way to convert to the correct hex? </p>