Stack trace corrupt characters
<p>I have a program which reports errors/stack trace back to me in case of crash and if user wishes to send it.</p>

<p>Occasioanly I receive wierd charcters in error message and also stack trace as you can see below.</p>

<pre><code>ãƒ•ã‚¡ã‚¤ãƒ«ã¾ãŸã¯ã‚¢ã‚»ãƒ³ãƒ–ãƒª 'Interop.iTunesLib, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null'ã€ã¾ãŸã¯ãã®ä¾å­˜é–¢ä¿‚ã® 1 ã¤ãŒèª­ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚æŒ‡å®šã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã€‚


stack trace
------------------------------------------------------
  å ´æ‰€ STLib.TInfo.Init(Form f)
  å ´æ‰€ STLib.FormMain..ctor() å ´æ‰€ C:\repo_sync\ST\FormMain.cs:è¡Œ 37
  å ´æ‰€ STLib.Program.Main() å ´æ‰€ C:\repo_sync\ST\Program.cs:è¡Œ 54
</code></pre>

<p>My code that builds up the stack trace looks like this</p>

<pre><code>  private static void GlobalThreadExceptionHandler(object sender, System.Threading.ThreadExceptionEventArgs e)
    {
        ...
        String stackTrace = "";
        Exception currentEx = e;

        do
        {
            stackTrace += string.Format("\r\n{0}", currentEx.Message);
            stackTrace += "\r\n------------------------------------------------------";
            stackTrace += string.Format("\r\n{0}", currentEx.StackTrace);
            currentEx = currentEx.InnerException;
            if (currentEx != null)
            {
                stackTrace += "\r\nCaused by";
            }
        }
        while (currentEx != null);
        .....
      }
</code></pre>

<p>I guess probably it has to do Non English language of that machine, can someone please advise me on this as to whats wrong here..</p>

<p>Added after Hans Pasant's comment</p>

<p>I have following code which converts the stack trace to bytes before posting to a web..</p>

<pre><code>byte[] postdata = System.Text.Encoding.UTF8.GetBytes(stackTrace)
</code></pre>

<p>I post this data using exactly the same code as here</p>

<p><a href="http://stackoverflow.com/questions/219827/multipart-forms-from-c-sharp-client">Multipart forms from C# client</a> posted by Brian Grinstead</p>
