Re: Escaped characters in variables, XML-RPC, Mac OS X
Re: Escaped characters in variables, XML-RPC, Mac OS X
- Subject: Re: Escaped characters in variables, XML-RPC, Mac OS X
- From: Bryan <email@hidden>
- Date: Thu, 01 Nov 2001 07:11:44 -0500
- Organization: Apex Radiology
You are starting with data, and ending with data; but in between you need
text if you are editing in a text processor.
You may want to try using an OSAX which handles the data-text
transition. One such is PrefIO + (Steve LoBasso) which has the command
MakeValueText.
http://osaxen.com/?id=make_value
Then to go back to data, just use a "run script" wrapper to get rid of the
escaped characters.
Try this
set mystring to MakeValueText "He said \"it's fine\""
run script mystring
set mynewstring to {mystring} & " becomes " & result
return mynewstring
Jeremy Reichman wrote:
>
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
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
[demime 0.98b removed an attachment of type text/x-vcard which had a name of bryan.vcf]