Source file encoding bug

Hi

When the source file encoding is the [unicode code 1200], cannot demonstrate correctly

herry

Comments

  • Hello,

    There have been a few reports about source code not displaying correctly when high-byte characters are used in the source code.

    We are trying to identify and fix the problem. Thanks for your patience.
  • Thanks for your patience. We suspect that the root cause may be the font used in the source code view. We have added the ability to specify a font in the latest beta of ANTS Profiler 4.1. I hope this helps!

    http://www.red-gate.com/messageboard/vi ... php?t=7806
  • Bart ReadBart Read Posts: 997 Silver 1
    Hi there,


    Please see this post for instructions on how to change the font in the source code view:

    http://www.simple-talk.com/community/bl ... 69800.aspx

    If this doesn't fix the problem please let us know.


    Many thanks,


    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Hi

    Very happy can see the answer, thinks.

    I try to modify the [PerformanceProfilerUISettings.xml] file
    ===================================================================
    <SourceViewFont FamilyName="MS UI Gothic" EmSizePoints="10" Style="Regular" />
    ===================================================================
    But cannot demonstrate correctly.

    I think when source file read, [ANTS Performance Profiler 4] selected encoding is error.

    my source file encoding is the [unicode code 1200], but [ANTS Performance Profiler 4] cannot specific the source file encoding.

    Sample code
    =============================================================
    string sourceCode = string.Empty;
    using (System.IO.StreamReader sr = new System.IO.StreamReader("test.cs", System.Text.Encoding.Unicode))
    {
    sourceCode = sr.ReadToEnd();
    }
    //to do...
    =============================================================

    Remark:
    Encoding.Unicode = [unicode code 1200]

    herry
  • Bart ReadBart Read Posts: 997 Silver 1
    Hi Herry,


    OK thanks. Sorry it hasn't worked. I do have a suspicion about what's happening though.

    Could you do me a favour and do the following please.

    - Start ANTS Profiler.
    - Hit Cancel on the "Performance Profiler Settings" dialog.
    - Go to Tools > Options and uncheck the "Include source code with saved results" option, then hit OK.
    - Now click File > New Profiling Session.
    - Profile your application.
    - Look at some methods with source code and see if the source view displays them correctly.

    Can you let me know the results of this please?


    Thanks,


    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Hi

    >- Start ANTS Profiler.
    >- Hit Cancel on the "Performance Profiler Settings" dialog.
    >- Go to Tools > Options and uncheck the "Include source code with saved results" option, then hit OK.
    >- Now click File > New Profiling Session.
    >- Profile your application.
    >- Look at some methods with source code and see if the source view displays them correctly.
    >
    >Can you let me know the results of this please?
    It's worked, thanks very much.

    herry
  • Bart ReadBart Read Posts: 997 Silver 1
    Great, thanks Herry. We'll get a fix out early next week that will allow you to include source with saved results.
    Cheers!
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.