mac and pc escape characters

Discussion in 'ASP .Net' started by JJ, Jun 26, 2007.

  1. JJ

    JJ Guest

    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
    JJ, Jun 26, 2007
    #1
    1. Advertising

  2. JJ

    Mark Rae Guest

    "JJ" <> wrote in message
    news:...

    > 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, Jun 26, 2007
    #2
    1. Advertising

  3. JJ

    JJ Guest

    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" <> wrote in message
    news:...
    > "JJ" <> wrote in message
    > news:...
    >
    >> 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, Jun 26, 2007
    #3
  4. JJ

    Mark Rae Guest

    "JJ" <> wrote in message
    news:%...

    > 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
    Mark Rae, Jun 26, 2007
    #4
  5. JJ

    JJ Guest

    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" <> wrote in message
    news:OtqX$...
    > "JJ" <> wrote in message
    > news:%...
    >
    >> 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, Jun 26, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Griff

    trying out escape characters

    Griff, Aug 3, 2004, in forum: Perl
    Replies:
    6
    Views:
    604
  2. Maziar Aflatoun

    Escape characters

    Maziar Aflatoun, Dec 5, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    554
    Jason S
    Dec 5, 2003
  3. polilop

    String and escape characters

    polilop, Dec 15, 2006, in forum: Java
    Replies:
    2
    Views:
    617
    polilop
    Dec 15, 2006
  4. slomo
    Replies:
    5
    Views:
    1,526
    Duncan Booth
    Dec 2, 2007
  5. mix
    Replies:
    4
    Views:
    1,024
    Emile van Sebille
    Oct 30, 2010
Loading...

Share This Page