Source file encoding bug
jdsuchen
Posts: 4
Hi
When the source file encoding is the [unicode code 1200], cannot demonstrate correctly
herry
When the source file encoding is the [unicode code 1200], cannot demonstrate correctly
herry
Comments
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.
http://www.red-gate.com/messageboard/vi ... php?t=7806
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
Principal Consultant
bartread.com Ltd
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
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
Principal Consultant
bartread.com Ltd
>- 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
Cheers!
Bart
Principal Consultant
bartread.com Ltd