Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   mac and pc escape characters (http://www.velocityreviews.com/forums/t517711-mac-and-pc-escape-characters.html)

JJ 06-26-2007 08:28 AM

mac and pc escape characters
 
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



Mark Rae 06-26-2007 08:59 AM

Re: mac and pc escape characters
 
"JJ" <abc@xyz.com> wrote in message
news:ufNdSw8tHHA.680@TK2MSFTNGP05.phx.gbl...

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


--
http://www.markrae.net


JJ 06-26-2007 09:19 AM

Re: mac and pc escape characters
 
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



"Mark Rae" <mark@markNOSPAMrae.net> wrote in message
news:uotrBB9tHHA.4800@TK2MSFTNGP05.phx.gbl...
> "JJ" <abc@xyz.com> wrote in message
> news:ufNdSw8tHHA.680@TK2MSFTNGP05.phx.gbl...
>
>> 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?
>
>
> --
> http://www.markrae.net




Mark Rae 06-26-2007 10:07 AM

Re: mac and pc escape characters
 
"JJ" <abc@xyz.com> wrote in message
news:%23eX7xM9tHHA.5036@TK2MSFTNGP03.phx.gbl...

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


--
http://www.markrae.net


JJ 06-26-2007 10:21 AM

Re: mac and pc escape characters
 
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
"Mark Rae" <mark@markNOSPAMrae.net> wrote in message
news:OtqX$m9tHHA.1204@TK2MSFTNGP03.phx.gbl...
> "JJ" <abc@xyz.com> wrote in message
> news:%23eX7xM9tHHA.5036@TK2MSFTNGP03.phx.gbl...
>
>> 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...?
>
>
> --
> http://www.markrae.net





All times are GMT. The time now is 10:16 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.