Escaped characters in variables, XML-RPC, Mac OS X
Escaped characters in variables, XML-RPC, Mac OS X
- Subject: Escaped characters in variables, XML-RPC, Mac OS X
- From: Jeremy Reichman <email@hidden>
- Date: Tue, 30 Oct 2001 21:19:27 -0500
I'm trying to edit a UserLand Frontier/Manila Web site page through
TextEdit on OS X. I can download the current contents of the page on the
Manila server as text and place that in TextEdit. When I try to take the
updated text and upload it to the server, I've got it in an AppleScript
variable. AppleScript thus escapes things like quotes that were in the
TextEdit window, and this escaping interferes with the text in such a way
that the Manila server app doesn't interpret it correctly. (Escaped quotes,
for example, don't get used as Manila shortcuts, and I want them to.)
This is very similar to the escaped character problem in BBEdit,
especially when you're doing grep searches there. You have to
double-escape backslashes there to make sure they get passed to BBEdit's
grep engine properly. I have more control in building those string
variables than I think I do in this non-BBEdit-related situation. Here, AS
is escaping text that I don't want escaped.
However, besides escaping everything manually in TextEdit -- and creating
a lot of extra work that I really think the computer should handle for me
-- I'm not sure how to remedy this. Is there a routine I could use to
un-escape the stuff in my variable before I send it up to the XML-RPC
application? Might there be another clever solution?
--
Jeremy Reichman
Software Specialist III / Instructor
Customer Support Services
Information & Technology Services
Rochester Institute of Technology