Home Dashboard Directory Help

Visual Studio 2010 crash when the source file contains non-Unicode characters. by Will Zhang1


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 550886
Opened: 4/13/2010 10:25:07 PM
Access Restriction: Public
User(s) can reproduce this bug


I am using the release version. In my system encoding setting, I set using "Chinese (Simplified, PRC)" for non-Unicode programs. If my source file contains non-Unicode character (e.g © Copyright). An error dialog will popup when I open this file. The error as follow:
File Load

Some bytes have been replaced with the Unicode substitution character while loading file xxxxxx with Chinese Simplified (GB2312) encoding. Saving the file will not preserve the original file contents.

When I type a pointer of class, the VS will hint the functions which this class have. And VS will crash if the class source file contain the non-Unicode characters. Sucks.
Sign in to post a comment.
Posted by Microsoft on 7/1/2010 at 4:44 PM
Will: I'm writing to let you know we just checked in a fix for the crash you're experiencing. As I noted above, we don't typically provide hotfixes for individual Connect bugs, but we will include the fix in the next major release of Visual Studio and consider it for any future VS 2010 service packs.

CLGan333: It sounds like you're actually experiencing a different issue. Could you file a new Connect bug with as much information as you have? We'd like to investigate, but it tends to be easier to track one issue per bug.

Thank you both for your feedback,
Posted by Leon Gan on 5/27/2010 at 3:19 AM
We faced the same issues.

We upgraded our code from .net2 to .net4.

All our files have been changed automatically from Unicode to GB2312 codepage. This created a lot of problems in our code.

The Encoding page keep popup to ask us select the Codepage to be used. Whenever we select Unicode -Codepage 1200 anc check in the code into our SourceSafe, system hang and run out of memory.

When we select Unicode (UTF-8 with signature), it is no problem.

Next time we open again, it popup to ask selecting the encoding page again. What annoying...

How do we solve this permanently?

We changed the properties file in SourceSafe but doesn't help.

Please help...
Posted by Microsoft on 5/12/2010 at 4:07 PM
Hi Will - We're still looking into this. We don't believe it has already been fixed, but if it has (or if we fix it in the future), we typically don't issue patches for individual Connect bugs. This bug is currently assigned to an engineer for investigation, and we'll post again here as soon as we have more information to share.

Thanks for your feedback,
Brittany Behrens
Program Manager, VS Platform - Editor
Posted by Will Zhang1 on 4/22/2010 at 8:18 AM
When will you fix it? Can you give me a patch if you already fix it?
Posted by Microsoft on 4/16/2010 at 2:47 AM
Thanks again for your feedback!
We were able to reproduce this issue with the detail steps you provided. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Will Zhang1 on 4/15/2010 at 7:50 PM
OK. I put my code and reproduce steps as the attachment. You can have a look.
Posted by Microsoft on 4/15/2010 at 3:22 AM
Thank you for reporting this issue.
But we're unable to reproduce this bug with the steps you provided on Visual Studio 2010 RTM. Could you please provide a video to help us investigate it?
Sign in to post a workaround.
Posted by Marcello.Ghali on 7/23/2011 at 3:15 AM
I got the same issue, but the workaround I found is: open Notepad and save the file as Unicode file.
Pretty easy.
File Name Submitted By Submitted On File Size  
error dialog.jpg 4/13/2010 35 KB
system encoding.jpg 4/13/2010 72 KB
CrashVS.zip 4/15/2010 1.2 MB
ReproduceCrash.zip 4/15/2010 788 KB