webapp crashes after deployment

When running my app that gets some data and forwards this to a remote datalog app, locally everything runs fine.
However after deployment I get an unhandled exception:

Unhandled Xojo.Core.BadDataException
Message: String must have a known encoding

Stack:
String.$ToText%y%s
RunPage.RunPage.store_data%%o<RunPage.RunPage>s
RunPage.RunPage.MyDialog_Dismissed%%o<RunPage.RunPage>o<Modal1.Modal1>
Delegate.IM_Invoke%%o<Modal1.Modal1>
AddHandler.Stub.39%%
WebDialog._ExecuteEvent%b%osA1v
WebControl.!_ExecuteEvent%b%ssA1v
WebSession._HandleEvent%%oso<_HTTPServer.HTTPRequestContext>
WebSession._HandleRequest%i4%oso<_HTTPServer.HTTPRequestContext>
WebApplication._HandleHTTPRequest%%oo<_HTTPServer.HTTPRequestContext>
_CGIGateway.GatewayRequestThread.Event_Run%%o<_CGIGateway.GatewayRequestThread>

It concerns a call to my RunPage.store_data method because commenting this out results in the error disappearing.
That method has 2 lines of code:

URL = "https://onk.com/temp/store_data.php?var="+mydata my_http.SEND("GET", URL.toText)

(note that the store_data here in the URL is the name of the remote datalogger, not of my local method)

The error ‘String must have known encoding’ suggests that it has to do with the encoding of the string URL.
But why doesn’t this result in error when running locally (and indeed acting as intended at the remote websites ‘store_data.php’)
What is even more mysterious that a similar call (with a mydata that is nearly the same) later in the coding doesn’t result in a runtime error.

And what’s the type of URL and mydata?

OK Greg, as you can see from the relevant code above the URL consists of 2 parts. First the real web address where a little app (store-data.php) is targeted. The second part after ‘?var=’ is a string variable (mydata) of comma separated values.
The little app ‘store_data.php’ just appends this csv part to a file. Hence it is logging my data. (BTW In contrast what I wrote above the store_data method in my web-app consistently crashes when deployed.)
It all works properly when I run the app locally (so do run rather than deploy in the XOJO environment)
When I say properly I mean that the csv data are properly stored remotely.
I hope that someone has seen this before.
The same store_data method has worked before when deployed. I will try to backtrack when this difference in functioning between local use and deployed use started.
I do not deploy each time I have dome some editing. Only when I am satisfied. So this may be days ago that I changed some coding that resulted in this strange behaviour.

Well the error you are getting is because there’s an encoding problem. What I was trying to find out is if those two properties are Strings, because if they are and you are getting data from outside of your app, you need to make sure they’re all converted or set to the same encoding before you add them together.