Bug? Specific binary character throws errors in scripts (even when commented out)

Bob Sneidar bobsneidar at iotecdigital.com
Wed Apr 21 12:31:11 EDT 2021

Hi Roland. I had similar issues with non-printing characters when drag-dropping data from an OCR'd PDF. Apparently in order for Adobe to get the OCR's text to get close to the positioning of the "text" in a scanned image, they have to pull some shenanigans. 

I used a similar approach to yours, which I call cleanAscii() which simply iterates through every character in the dragdata ["text"] and copies only the printable characters to a new variable which it returns. 

Bob S

> On Apr 21, 2021, at 09:12 , R.H. via use-livecode <use-livecode at lists.runrev.com> wrote:
> I am reading binary data from a .LNK file on Windows 10 using LC 9.6.1.
> There is a character that looks visually like a dot ".", but it is not, and
> using the chartonum() function or placing it in a script (even when
> commented out) results in an error message. The whole script will not work
> and be interpreted.
> I overcame the problem using this fragment in my parseSymbolicLink()
> function.
> ...put URL("binfile:"&pFilePath) into tContent1
> ...put binaryDecode("a*",tContent1,tContent2)
> ...repeat for each char tChar in tContent1
> .....put chartonum(tChar) into n
> .....if n > 31 then put tChar after tContent3
> ...end repeat
> But nevertheless, it made me be curious.
> Also, probably everyone has seen this, sometimes, especially in list
> fields, characters scramble up in one place and become unreadable, this
> happens with some characters it seems, but also just with usual ASCII in
> long strings. It happens from time to time and I see it at least for the
> last 10 years...
> Are there such codepoints/characters that are known to stop the system from
> working in a script and using any function on them?
> Roland
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the use-livecode mailing list