Hello, I am having trouble converting string to text for URL parameters. I have tried various re-encoding attempts but so far I have failed. Here is my problem:
- New Xojo Web Project
- Create new Open Event handler inside the Session and put this code in the Open Event:
[code] Dim s As String = URLParameter(“TestParameter”)
Dim t As text
t = s.ToText
- Run project and go to http://127.0.0.1:8080?TestParameter=hello
Expected result: Two messages in the debugLog both saying ‘hello’.
Actual result: The string is reported correctly, but ‘t’ has a Bad data exception, “must have a known encoding”. I have tried various re-encoding attempts but so far I have failed.
Please can someone point me in the right direction?