473,562 Members | 3,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change default encoding

Hi all
how can I change default encoding for saving C# files??
I want to set it always to Unicode -CodePage1200.
thanks.
Dec 28 '05 #1
4 8243
perspolis <re*****@hotmai l.com> wrote:
how can I change default encoding for saving C# files??
I want to set it always to Unicode -CodePage1200.


Why not just always specify it when you start writing the file
(presumably with a StreamWriter)? That would make it a lot clearer to
anyone reading the code.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dec 28 '05 #2
No,I mean with VS editor not with stream writer..after creating some class
files I want to be saved with Unicode encoding..
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
perspolis <re*****@hotmai l.com> wrote:
how can I change default encoding for saving C# files??
I want to set it always to Unicode -CodePage1200.


Why not just always specify it when you start writing the file
(presumably with a StreamWriter)? That would make it a lot clearer to
anyone reading the code.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Dec 28 '05 #3
Hi perspolis,
if you go to the "Save As" dialog click on the down arrow on the Save
button, it will give you the option to "Save with encoding..." then you can
then choose the 1200 codepage from the list.

Hope that helps
Mark Dawson
http://www.markdawson.org

"perspolis" wrote:
No,I mean with VS editor not with stream writer..after creating some class
files I want to be saved with Unicode encoding..
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
perspolis <re*****@hotmai l.com> wrote:
how can I change default encoding for saving C# files??
I want to set it always to Unicode -CodePage1200.


Why not just always specify it when you start writing the file
(presumably with a StreamWriter)? That would make it a lot clearer to
anyone reading the code.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Dec 28 '05 #4
I know that.I want it's done automatically not by selecting "Save with
Encoding"..can I do that?
"Mark R. Dawson" <Ma*********@di scussions.micro soft.com> wrote in message
news:F9******** *************** ***********@mic rosoft.com...
Hi perspolis,
if you go to the "Save As" dialog click on the down arrow on the Save
button, it will give you the option to "Save with encoding..." then you can then choose the 1200 codepage from the list.

Hope that helps
Mark Dawson
http://www.markdawson.org

"perspolis" wrote:
No,I mean with VS editor not with stream writer..after creating some class files I want to be saved with Unicode encoding..
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
perspolis <re*****@hotmai l.com> wrote:
> how can I change default encoding for saving C# files??
> I want to set it always to Unicode -CodePage1200.

Why not just always specify it when you start writing the file
(presumably with a StreamWriter)? That would make it a lot clearer to
anyone reading the code.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Dec 28 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
49300
by: Ann | last post by:
Hi, Is there any way to Change encoding of Java Vm to ISO-8859-1? i am using Java vm along with an application called opencms. I get the following error message.. Error: the encoding of your Java VM is different from the OpenCms encoding! Java VM file encoding: UTF-8
18
6542
by: Klaus Alexander Seistrup | last post by:
Hi, After upgrading my Python interpreter to 2.3.1 I constantly get warnings like this: DeprecationWarning: Non-ASCII character '\xe6' in file mumble.py on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details And while I understand the problem, I cannot fathom why Python
0
1893
by: Brad Wood | last post by:
I have a web service that returns an xml doc as a string. I use a StringWriter with my XmlTextWriter and the encoding attribute for the document becomes utf-16. If I save the result of the web service to a file, the document won't parse in I.E. unless I change the responseEncoding in my web.config to utf-16 and write the result to file...
0
493
by: 6kjfsyg02 | last post by:
I have written a client to a web service. I use ASP.NET 1.1 for the client. It worked until I tried to send accented characters. Then the service answered that my signature is not valid. I was told by the people running the service that their host takes ISO-8859-1 (Latin1) and nothing else. I had been sending the default UTF-8. I tried to...
0
2225
by: sindhuja | last post by:
How to change the default encoding of asp .net webservice to ISO-8859-1? I have tried the following but have ' nt got my work done > I modified the globalization attribute in web.config > I gve the foolowing 2 lines in the constructor of the web service this.Context.Response.ContentEncoding =...
14
5748
by: Zoro | last post by:
My task is to read html files from disk and save them onto SQL Server database field. I have created an nvarchar(max) field to hold them. The problem is that some characters, particularly html entities, and French/German special characters are lost and/or replaced by a question mark. This is really frustrating. I have tried using StreamReader...
11
26545
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my...
4
2576
by: Ron Garret | last post by:
Is there a way to change the default string encoding used by the string.encode() method? My default environment is utf-8 but I need it to be latin-1 to avoid errors like this: Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 4: ordinal not in...
1
5394
by: ziycon | last post by:
I'm wondering how you change the default encoding on SQL server and also how do you change the encoding on existing tables in a SQL DB?
0
7655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7935
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6221
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5477
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3623
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3608
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
903
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.