Thanks. At this point I think we are dealing with a very simple subset and the current solution works. At least until I see a counter example.
What is being done here is the text file is in the html response stream as the content for a textarea. All that is needed to see that this goes as intended is to map & to & and < to < and this seems to get the desired text in the textarea. Copying this to the clipboard reverses these mappings by virtue of the built in clipboard conversion of html to text. On Wed, Jun 20, 2012 at 11:58 AM, Devon McCormick <[email protected]>wrote: > I've only been skimming these i-pad discussions, but thought I would > offer this: I recently wrote a base-64 encoder/decoder if that would > help with these transfer problems - it's really more suited for image > encoding->ASCII subset but you could use it for general HTML. > > NB.* base64.ijs: encode and decode base-64 strings. > > B64=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' > b64decode=: B64&([: #. _8 ]\ [: , 2 2 2 2 2 2 #: i.) > NB.EG (a.{~b64decode pngeg) fwrite 'mandelSample64x64.png' > b64encode=: B64&([ {~ [:#. _6 ]\ [: , (8$2) #: ]) > NB.EG pngeg=. b64encode a. i. fread 'mandelSample64x64.png' > > > On Wed, Jun 20, 2012 at 12:00 AM, <[email protected]> wrote: > ... > > Message: 1 > > Date: Tue, 19 Jun 2012 14:31:10 -0500 > > From: John Baker <[email protected]> > > Subject: Re: [Jbeta] data transfer fixes > > To: Beta forum <[email protected]> > > Message-ID: > > <CABc= > [email protected]> > > Content-Type: text/plain; charset=UTF-8 > > > > A good test would be to use HTML source in place of J scripts. If the > > unmangle recovers the original it's probably good enough. > > > > I've long used wrapped > > > > txt=: LF, fread '~temp/t.ijs' > > enc=: 5!:5 <'txt' > > > > It expands the scripts but completely eliminates delimiters that may > > clash with HTML > > > > On Tue, Jun 19, 2012 at 2:15 PM, Eric Iverson <[email protected]> > wrote: > >> I thought the minimal mangling done was sufficient (assuming it is > properly > >> undone at the receiver). > >> > >> Why do you think the mangling is defficient? It is intended to handle > html > >> and html fragments and in my simple tests it did? > ... > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
