Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

How can I prevent VS 2008 from saving files in UTF-8 encoding?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Herrmann - 08 May 2008 22:25 GMT
When I add a new file to a VS 2008 project, it saves it to disk using UTF-8
encoding. I can change this by using the Advanced Save As File menu item, but
I would prefer to configure my VS 2008 to save files in Western Europe
(Windows) encoding (code page 1252) by default. I could not see any Option
settings that would allow for this.

Is there a way to configure VS 2008 to save files using an encoding other
than UTF-8 by default?

Thanks for any help.

-Dave
Serge Wautier - 09 May 2008 09:04 GMT
Weird. Mine defaults to 1252 (My user locale is French/Belgium).
What type of file are you creating (.cpp, .cs, .xml,...) ?

Serge.
http://www.apptranslator.com - Localization tool for your C++ applications

> When I add a new file to a VS 2008 project, it saves it to disk using
> UTF-8
[quoted text clipped - 10 lines]
>
> -Dave
Dave Herrmann - 09 May 2008 16:31 GMT
Well, it appears this only happens in my Database projects. I have a VS 2008
database project that contains a number of SQL stored procedures. If I select
Add a New Item option and pick SQL script, or stored procedure as the file,
it creates a new file just fine. But when I select File-->Advanced Save it
shows the code page as Unicode (UTF-8 with signature) - Codepage 65001. If I
forget to save with a different encoding and then try to compile all my
stored procedures through a VB script, the new one will fail because of the
encoding bytes at the beginning of the file.

I'm not sure why this only happens with my database project files. I tried
this with a C++ project and any new files are created using codepage 1252,
Western European (Windows) which is what I really want.

I did not see any way to change this default behavior for database project
files so that's why I was posting this in case there was a way that I'm not
aware of.

Thanks.

-Dave

> Weird. Mine defaults to 1252 (My user locale is French/Belgium).
> What type of file are you creating (.cpp, .cs, .xml,...) ?
[quoted text clipped - 16 lines]
> >
> > -Dave

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.