469,924 Members | 1,429 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

How to programatically default the encoding of my "Notepad" into ANSI in c#

jj
How do I programatically default the encoding of my "Notepad" into ANSI.
My application uses notepad to save some text. Some of the client computers
have UTF as the default encoding in their notepad. This adds some
characters in my text and creates problems later on managing it.

So is there a way to create a text file in notepad with ANSI encoding
always?

Thanks
John
Nov 16 '05 #1
1 2734
If all you are trying to do is give a notepad like experience to the
user, I'd recommend not shelling out to notepad at all; instead add a
form to your application that has a multi-line text box on it an manage
the load and save of the file from there. It really shouldn't take too
terribly long to replicate notepad's functionality and you'll be able to
control the encoding without fear of the user messing with it (save as
and all that). Aside from that I have no idea if notepad has a
parameter that will allow you to force an encoding type.

Have A Better One!

John M Deal, MCP
Necessity Software

jj wrote:
How do I programatically default the encoding of my "Notepad" into ANSI.
My application uses notepad to save some text. Some of the client computers
have UTF as the default encoding in their notepad. This adds some
characters in my text and creates problems later on managing it.

So is there a way to create a text file in notepad with ANSI encoding
always?

Thanks
John

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Trevor Fairchild | last post: by
2 posts views Thread by Ziver MALHASOGLU | last post: by
2 posts views Thread by Arne | last post: by
11 posts views Thread by LucaJonny | last post: by
4 posts views Thread by =?Utf-8?B?R2lubw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.