[Gambas-user] bizarre invisible chars

Charlie Ogier charlie at cogier.com
Sat Jan 7 16:45:47 CET 2023



On 07/01/2023 06:00, Bruce Steers wrote:
>
>
> On Fri, 6 Jan 2023 at 23:38, BB <adamnt42 at gmail.com> wrote:
>
>     On 7/1/23 9:49 am, Bruce Steers wrote:
>         etc
>
>     Well matey, I tried both your attached script and the GambasOne
>     methods you describe and got no errors at all in 6 or so different
>     editors including the IDE. The only way I could find a way to
>     force your mysterious junk to appear was to paste the clipboard
>     directly into a terminal. There I see some text is repeated...
>     like the old impact printer way of producing bold or perhaps it
>     was backspaced? (memory failure here)
>
>     Best of luck.
>
>
> Cheers for having a look fella , i got there eventually (it's 6am , so 
> was a long night :-\ )
> I discovered the bloomin utf-8 chars all over it (and the problems 
> they cause) after Christof's nudge in the right direction :)
>
> Time for sleep
>
> Respects
> BruceS
>
>
> ----[http://gambaswiki.org/wiki/doc/netiquette  ]----

Hi Bruce,

This code works for me.

Charlie
'*****************************************
Public Sub Form_Open()

   Dim sFile As String = File.Load(Application.Path &/ "NextBoot2")
   Dim sNewFile As String
   Dim iLoop As Integer

   For iLoop = 0 To Len(sFile) - 1
     If Asc(sFile[iLoop]) > 0 And Asc(sFile[iLoop]) < 128 Then sNewFile 
&= sFile[iLoop]
   Next

   Clipboard.Copy(sNewFile) 'Copy to clipboard or Save to file
   'File.Save(Application.Path &/ "NextBoot2FIXED", sNewFile)        
'Copy to clipboard or Save to file

End
'*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230107/7421861f/attachment.htm>


More information about the User mailing list