title: Characters changing in Graphics.DrawString
body: <p>I have a dll written in C#.  One of the methods takes a parameter <code>string txt</code>.  The dll is being called from a classic asp page.  At the time of calling, the text contains the character <code>é</code> which is obtained by holding down <kbd>ALT</kbd> and typing 130 on the number pad or by holding down <kbd>ALT-GR</kbd> and hitting <kbd>e</kbd>.</p>
  
  <p>The <a href="http://msdn.microsoft.com/en-us/library/system.drawing.graphics.drawstring.aspx" rel="nofollow">DrawString</a> method is outputting it wrong.  I realize there is a character set/font issue, but I don't know how to get round the problem.</p>
  
  <p>What I get on a British keyboard and localization using Arial font is a capital A with a tilde above it followed by lowercase c in a circle.</p>
  
  <p>The individual entering the text may be using any keyboard layout, may have any localization on their PC, but they will all be entering it via our web page.</p>
  
  <p>What do I need to do to make things compatible or to convert?</p>
  
  <p>The relevant bit of code is:</p>
  
  <pre><code>Bitmap image = new Bitmap(strFilePath);
  
  Graphics m_graphics;
  m_graphics = Graphics.FromImage(image);
  
  Font fnt = new Font("Arial", 12.0f);
  
  StringFormat strFormatter = new StringFormat();
  
  SolidBrush txtBrush = new SolidBrush(Color.FromArgb(127, Color.FromArgb(int.Parse("AB12CD", NumberStyles.HexNumber))));
  
  m_graphics.DrawString("é", fnt, txtBrush, new Point(200, 200), strFormatter);
  </code></pre>