mac and pc escape characters

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
 
M

Mark Rae

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?
 
J

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();
}


Thanks,
JJ
 
M

Mark Rae

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...?
 
J

JJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top