[Gambas-user] bizarre invisible chars

Bruce Steers bsteers4 at gmail.com
Fri Jan 6 23:35:04 CET 2023


Hi all.
Attached is a script file that has me very puzzled.

It's a thing i've seen a bit of recently using my gambas text editor, no
idea the cause.

the attached script has some lines that appear to be just some spaces but
they are not.
I have tried all sorts to clear them, Trim does not trim them.

I have no idea how the file got this way , i think i may have copied the
text from gambas ide or my script editor, i suspect it could a
gb.form.editor issue.

I tried this on it...
   For c As Integer = 0 To tEditor.Count - 1
    Dim iLen As Integer = tEditor[c].Length
    Dim sLine As String = LTrim(tEditor[c].Text)
    tEditor[c].Text = If(sLine And (iLen <> sLine.Len), String(iLen -
sLine.Len, " ") & sLine, "")
   Next

that should trim the pre-spaces and replace them but it doesn't, and
looking at the debugger the spaces do not get trimmed, then i get a "bad
argument" error.

Most puzzling.
In the attached file if you use gambas TextEditor with shell highlighting
the offending lines are all in the "string" colour.
If you delete the spaces at the start of the line manually and re-input
them then the highlighter shows correct.

Even using Quote() does not show anything , just spaces

PS. the script fails to run until all offending chars are removed.

Wishing well
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230106/e0825a23/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NextBoot2.tar.gz
Type: application/gzip
Size: 1054 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230106/e0825a23/attachment-0001.gz>


More information about the User mailing list