المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem with saving file.



C# Programming
07-20-2009, 09:14 AM
Hello forum,
I need help. In my program I use a rich text box to display a text file. This text file contains some normal text and a special character "ë". User can modify this text file. To save the updated file I used below code :

TextWriter tw = new StreamWriter(@label3.Text);
tw.WriteLine(rtEngData.Text);
tw.Close();


Note :Here label3 contains the file name.


while saving the file I found one problem. The character "ë" is changed with "?«". I don't know why but it happens.
Can any one suggest me what to do to solve this problem.
I want to save the file as it is in the richtextedit.

waiting for any kind reply.......
Thanks
Vishal Moharikar.