Load a text file that has been encrypted (using xojo’s encodebaste64), decript it and just display the content on a set of bevebuttons (named Kits).
There are two major problems that I don’t understand:
Even if I used the right encoding it doesnt display correctly unicode characters
For some reason I can only load the files once and then it gets all messed up
I’m sure it’s easier to understad what I’m saying by trying my app here on the link there’s also the text file to be load .
You set the encoding when you read the base64encoded text. That’s the wrong place. You need to set the encoding after you decode the text.
items(i)=DecodeBase64(items(i))
items(i)=trim(items(i))
items(i)=DefineEncoding(items(i), Encodings.UTF8)
if app.ISgoodmulti(items(i)) =true then filequestions.append items(i)
You begin by defining 2 separate arrays, Questions and FileQuestions. Then you execute this code in Startmenu:
Questions = FileQuestions
That makes both properties refer to the same array. It does not copy the contents from FileQuestions to Questions, as I presume you intended. It makes them the same array. So then when you execute Startmenu again, this line:
Redim Questions(-1)
removes the contents from the array that both Questions and FileQuestions point to.