C
Csharper95
I'm having problems with UNICODE and ASCII here.
I'm trying to make a program that reads in a text file containing a
couple of columns of data. This data is separated by one tab. I want
to change that so that the output file is identical except that tab
is changed to 2 empty spaces (in between the data columns).
the snip of code is something like this:
StreamReader stream = new System.IO.StreamReader(filename);
string read = stream.ReadLine();
//This does not work
read.Replace("\09"," ");
//And neither does this
charData = new char[read.Length];
charData = read.ToCharArray();
m = charData.Length;
for(int i=0; i<m;i++)
{
if(charData == '\09') //This part gives a
compile error
charData = ' ';
}
Anyone know an easy way to do this ?
What am I doing wrong?
How can I include UNICODE in various string or char related functions?
I'm trying to make a program that reads in a text file containing a
couple of columns of data. This data is separated by one tab. I want
to change that so that the output file is identical except that tab
is changed to 2 empty spaces (in between the data columns).
the snip of code is something like this:
StreamReader stream = new System.IO.StreamReader(filename);
string read = stream.ReadLine();
//This does not work
read.Replace("\09"," ");
//And neither does this
charData = new char[read.Length];
charData = read.ToCharArray();
m = charData.Length;
for(int i=0; i<m;i++)
{
if(charData == '\09') //This part gives a
compile error
charData = ' ';
}
Anyone know an easy way to do this ?
What am I doing wrong?
How can I include UNICODE in various string or char related functions?