Page 3 of 3

Re: Standalone through Remote Desktop access and VMs

Posted: Thu Apr 22, 2021 4:22 pm
by elanorb
Hi Albert

After doing some testing I think the issue might be related to line endings.

HTML5TestReport.txt has Windows line endings(CR and LF). HTML5TestReportDownAndUp.txt had Unix line endings(LF).

Changing the line endings in HTML5TestReport.txt using a text editor or by doing

Code: Select all

replace numToChar(13) with empty in <text data>
in LiveCode allowed me to create a new version of the file that could be loaded into a field in an HTML5 app.

I have reported a bug

https://quality.livecode.com/show_bug.cgi?id=23178

You can see my test app here

https://elanorb.on-rev.com/techsupport/ ... eTest.html

I hope that helps. Please let me know if that works for you.

Kind regards

Elanor

Re: Standalone through Remote Desktop access and VMs

Posted: Fri Apr 23, 2021 5:04 pm
by AlbertAA
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.

thank you again
-albert

Re: Standalone through Remote Desktop access and VMs

Posted: Fri Apr 23, 2021 7:05 pm
by bogs
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... :roll:

Re: Standalone through Remote Desktop access and VMs

Posted: Fri Apr 23, 2021 10:03 pm
by AlbertAA
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" :)

Re: Standalone through Remote Desktop access and VMs

Posted: Mon Apr 26, 2021 11:51 pm
by AlbertAA
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

Apostrophes ...

Hope this helps
-albert

Re: Standalone through Remote Desktop access and VMs

Posted: Tue Apr 27, 2021 3:30 pm
by elanorb
Thanks Albert, I have added this to the bug report.

Elanor

Re: Standalone through Remote Desktop access and VMs

Posted: Tue Apr 27, 2021 7:51 pm
by AlbertAA
... 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.

Re: Standalone through Remote Desktop access and VMs

Posted: Wed Apr 28, 2021 5:39 pm
by jacque
Could this be a conflict between UTF8 and UTF16?