Text overwriting itself in non wrapping field
Bob Sneidar
bobsneidar at iotecdigital.com
Thu Mar 17 12:08:21 EDT 2022
I have a cleanASCII function:
Bob S
FUNCTION cleanASCII pString, pModeList, pCustomList
/*
pModeList is a comma delimited list that may contain the following values:
"lowercase,uppercase,numbers,tabs,newlines,returns,spaces,symbols,custom"
If custom is used, then a third paramaeter containing allowed characters must be supplied.
*/
IF pModeList contains dash THEN replace dash with "\" & dash in pModeList
IF pModeList is empty THEN
put " 0-9a-zA-Z" into tAllowedChars
END IF
REPEAT for each item pMode in pModeList
put word 1 of pMode into pMode
SWITCH
break
CASE "tabs" is in pMode
put "\t" AFTER tAllowedChars
break
CASE "newlines" is in pMode
put "\n" BEFORE tAllowedChars
break
CASE "returns" is in pMode
put "\r" BEFORE tAllowedChars -- currently not working
break
CASE "spaces" is in pMode
put " " AFTER tAllowedChars
break
CASE "numbers" is in pMode
put "0-9" AFTER tAllowedChars
break
CASE "lowercase" is in pMode
put "a-z" AFTER tAllowedChars
break
CASE "uppercase" is in pMode
put "A-Z" AFTER tAllowedChars
break
CASE "symbols" is in pMode
put "!#$%&'()*+,./:;<=>?@\|\[\]\\_`{|}~^-" AFTER tAllowedChars
break
CASE pMode is "custom"
put pCustomList AFTER tAllowedChars
break
END SWITCH
END REPEAT
put "[" & tAllowedChars & "]" into tMatchText
REPEAT for each character theChar in pString
IF matchtext(theChar, tMatchText) is true THEN
put theChar AFTER cleanString
END IF
END REPEAT
return cleanString
END cleanASCII
> On Mar 17, 2022, at 08:58 , David V Glasgow via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi folks,
>
> I have imported just under 10,000 lines of a web history into a non wrapping scrollable field. As the subject above indicates, in one line characters appear rendered over the top of each other. The is quite stable, so redrawing or scrolling doesn’t make it go away.
>
> That line is pretty long, but not longer than field limits - 10693 chars
>
> Examining it, it looks like it ought to be a number of separate lines, and it also contains weird visible and also white space that is not a simple space. I can’t see any recognisable pattern to suggest where cr should be.
>
> Any suggestions about what is going on and how I might fix it?
>
> Cheers
>
> David Glasgow
> _______________________________________________
> 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