invalid character causing SaveInteractiveHTML() to make an incomplete reportWondering if there is some existing feature to deal with this.
I have JSL that is making a report containing a tabulate based on data queried from Oracle. The report looked fine in JMP (this is JMP12.1) but when I used SaveInteractiveHTML() it gave an incomplete report and the error "... PCDATA invalid character value 11...". I could tell which field was the problem because it did make the tabulate right up to the cell of text that tripped it up even though the character string that should have been there did not appear to have any strange characters in it.
Further study using ChartoHex on each character of that string did show it contained an invisible character ASCII 11 or hex "0B", apparently "vertical tab".
I updated my script to look through values of this particular column looking for the existence of this particular character and stripping that out. But presumably this is just one of many possible illegal characters that could show up and not work with the HTML (?) and maybe they could show up in other columns as well though this seems to have been a freak occurence so I should probably foolproof against this on all character cols on all my interactive HTML reports. Anyway, wondering if there is some existing JSL function that cleans character strings to make them work with the HTML function, building in which characters are legal or illegal?
Re: invalid character causing SaveInteractiveHTML() to make an incomplete reportYou're welcome. @Craige_Hales helped with the Regex command. Glad we could help.
Re: invalid character causing SaveInteractiveHTML() to make an incomplete reportThanks! Implemented that. Feel better stripping out "all" the potential problem characters.
Re: invalid character causing SaveInteractiveHTML() to make an incomplete reportIn HTML, the unprintable characters with ascii codes below 32 or hex codes from "00" to "1F" are invalid.
I don't know of an existing JSL script that would remove these characters, but the following column formula could be used in a new column to replace the invalid characters with space characters from strings in a column called "name" :
Regex(:name, "[\x00-\x1F]+", " ", GLOBALREPLACE)
Please let me know if you need help adapting this to your script.
~John