mac and pc escape characters

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

Does anyone know if there is any difference in the excape characters on a
Mac (compared to a PC). I am parsing some text that is pasted into a
textbox, and splitting it based on the position of \t or \r escape
characters.

Works fine on a PC, but it may not be working as expected on a Mac. Whether
this is because of differences in the text file format I have yet to
ascertain.

Thanks in advance,
JJ
 
Does anyone know if there is any difference in the excape characters on a
Mac (compared to a PC). I am parsing some text that is pasted into a
textbox, and splitting it based on the position of \t or \r escape
characters.

Works fine on a PC, but it may not be working as expected on a Mac.
Whether this is because of differences in the text file format I have yet
to ascertain.

It won't be the underlying operating system per se but rather the rendering
engine of the various browsers.

What Mac browser(s) are you using?

What code are you using?
 
Hi Mark.

The browser is Firefox 2.0 for MacOSX. I am doing this to grab fields out of
a text file, either (a) when its pasted into a textbox, or (b) when they
upload the file :

string.Split('\r') - to get the lines, then
string.Split('\t') - to get the fields

To get the string in the first place:
(a) string = textbox.text, or if the file is uploaded and the filepath is
supplied:
(b) using (StreamReader sr = new StreamReader(filePath))
{
contentsOfFile = sr.ReadToEnd();
sr.Close();
}


Thanks,
JJ
 
Hi Mark.

The browser is Firefox 2.0 for MacOSX. I am doing this to grab fields out
of a text file, either (a) when its pasted into a textbox, or (b) when
they upload the file :

string.Split('\r') - to get the lines, then
string.Split('\t') - to get the fields

To get the string in the first place:
(a) string = textbox.text, or if the file is uploaded and the filepath
is supplied:
(b) using (StreamReader sr = new StreamReader(filePath))
{
contentsOfFile = sr.ReadToEnd();
sr.Close();
}


Hmm - well there doesn't seem to be anything wrong with that...

What is actually happening when you split the string...?
 
I've only sketchy details at the moment. I just wanted to double check that
there wasn't anything in the difference between macs and pc's that had been
overlooked. It could well be that the string did indeed not have the
expected column titles as is instructed in large bold lettering on that
page(!)

The error message displayed stated this clearly, but I can't understand why
you wouldn't then correct the problem??!.

Thanks,
JJ

Perhaps they've overlooked the large, bold instructions on the
 
Back
Top