473,382 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

mac and pc escape characters

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
Jun 26 '07 #1
3 1392
"JJ" <ab*@xyz.comwrote in message
news:uf*************@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

Jun 26 '07 #2
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

"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:uo**************@TK2MSFTNGP05.phx.gbl...
"JJ" <ab*@xyz.comwrote in message
news:uf*************@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

Jun 26 '07 #3
"JJ" <ab*@xyz.comwrote in message
news:%2****************@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

Jun 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: BTnews | last post by:
Hi, Can anyone here point me at a definitive guide or tutorial about using escape characters when building SQL queries from user entered data? I'm especially interested in info on this in regard...
2
by: Matthew Wieder | last post by:
In my previous post, I asked about a routine which prepares a string for an XPath query by taking care of escape characters. Unable to find a list, I'm now wondering assumign I enclose the...
7
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %%...
18
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
4
by: Guadala Harry | last post by:
I need to place the following into a string... How can I properly escape the % " / < and > characters? <table width="100%" border="0" cellspacing="0" cellpadding="4px" class="hfAll"></Table> ...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
3
by: Guadala Harry | last post by:
I'd like to know the answer to the following question so I can know what to expect with regard to other similar uses of escape characters and strings. While everything works fine - I'd like to know...
7
by: Axel Dahmen | last post by:
Hi, within a DataGrid control I'm using a DataTable containing a string column to fill a Hyperlink's href attribute. Unfortunately HttpUtility.UrlEncode() doesn't escape the apostroph character,...
15
by: pkaeowic | last post by:
I am having a problem with the "escape" character \e. This code is in my Windows form KeyPress event. The compiler gives me "unrecognized escape sequence" even though this is documented in MSDN....
131
by: Lawrence D'Oliveiro | last post by:
The "escape" function in the "cgi" module escapes characters with special meanings in HTML. The ones that need escaping are '<', '&' and '"'. However, cgi.escape only escapes the quote character if...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.