Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8027773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:54:40+00:00 2026-06-04T23:54:40+00:00

I have a program which reports errors/stack trace back to me in case of

  • 0

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

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

ファイルã¾ãŸã¯ã‚¢ã‚»ãƒ³ãƒ–リ '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

My code that builds up the stack trace looks like this

  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);
        .....
      }

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..

Added after Hans Pasant’s comment

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

byte[] postdata = System.Text.Encoding.UTF8.GetBytes(stackTrace)

I post this data using exactly the same code as here

Multipart forms from C# client posted by Brian Grinstead

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T23:54:42+00:00Added an answer on June 4, 2026 at 11:54 pm

    This is a text encoding problem. You’ll get this when your code bombs on a machine that’s for example Japanese, Korean or Chinese. Exception traces are generated using the machine’s default language. The English version looks like:

    at namespace.method(args) in C:\path\filename.cs:line 10

    where the at, in and line parts of the message will be in the native language, using character glyphs for CJK languages. Everything will work in the snippet you posted. What goes wrong is what you do to get the string from the crashing machine to your machine. Which is entirely unclear from the question. But if you, say, do it with an email message then you are not using the proper BodyEncoding. Or you do but your email reader doesn’t interpret it correctly.

    The high incidence of ムmakes it likely that the original text was encoded in utf8, they are character codes 0xC3 and 0x83 when using a Western code page. Which are the first 2 bytes of 3 byte utf-8 sequences for codepoints U+30C0 and up. Which are Hiragana and Katakana glyphs. Thus making it pretty likely that your program crashed on a Japanese machine. And that you read the text with Encoding.Default on your machine instead of Encoding.UTF8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program, which uses quickreports 5 to generate some reports. The program
I have a program which I would like to run every X min the
I have a program which runs an external, command line utility and reads the
I have a program which doesn't once reference System.I0, coded in vb.net, yet for
I have a program which takes a long time to complete. I would like
I have a program which runs on a console and its Umlauts and other
I have a program which needs to invoke a process to perform an operation
I have a program which does a system call: latex somefile.latex This runs ok,
I have a program which reads an XML file using the DOM functions: $doc
I have a program which places structures in a linked list based on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.