Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Yes. By replacing "return" with an empty space the HTML5 standalone works (it loads the file).
I tried with a file created by a LC stack containing only "line 1 & return & "line 2". If I put the file on the server the HTML5 standalone blocks.
To make it work I tested producing the file under Windows (the report files I store can be actually produced on both platforms, depending on where my app is running) - I had to use:
replace numToChar(10) with "" in theData
because replacing numToChar(13) was not doing the job. I think that I will have to distinguish between platforms before making the replace.
Now that the loading issue has been clarified and resolved, my remaining "problem" is that by substituting "return" with "empty" the file does not display correctly in a browser anymore (all linefeeds are lost). Besides that the HTML5 standalone is now able to do what I expected.
AlbertAA wrote: Fri Apr 23, 2021 5:04 pm
Now that the loading issue has been clarified and resolved, my remaining "problem" is that by substituting "return" with "empty" the file does not display correctly in a browser anymore (all linefeeds are lost).
I wonder what would happen if you replaced the returns with "<br>" instead of empty...
Good idea. I tried it.
After the replace the file generated looks again good in a browser, but unfortunately the HTML5 Standalone cannot load it and gets stuck. Really does not seem to appreciate/digest well text including return or <br>. I'll end up replacing my returns with "HTML5StandaloneCompatibleLinefeed"
For your info I found out that other Text files that I was producing crashed when loading with the HTML5 standalone even after replacing return (numToChar(10))
They started working again after I replaced another character which blocked the loading in the HTML5 standalone:
replace numToChar(146) with numToChar(39) in thetrace
... and by the way numToChar(147) stopped me too.
One has to be careful with Apostrophes, but also with different types of Quotation marks. Unless this is kind of "obvious" for most people, users should be at least informed. Thank you for following this up.