Hi,
I have used C# in vs 2003, in my application i have to read text file, pick data from text file and insert into database, but the text file have some garbage value (garbage value "Ú" ) , so i should replcace this garbage value to single space, i tried to use stream reader to read text file, but the problem is stream reader not at all reading this garbage value, its awqlays neglecting this garbage value, the following code i have used in my application
StreamReader reader = new StreamReader(@"d:\web_extract.txt");
string str = reader.ReadToEnd();
StringBuilder strbuild = new StringBuilder(str);
string gb = "Ú";
reader.Close();
strbuild.Replace(gb," ");
StreamWriter writer = new StreamWriter(@"d:\web_extract.txt");
writer.Write(strbuild.ToString());
writer.Close();
please anybody help me to solve this problem and take me out, Advanced thanks for any reply.
Thanks.