Law & order with Web 2.0 default encodings

Can we please have some standardisation (irony: not standardization) around Web 2.0 encodings? The following failed silently causing an unrelated URLConnection not to send from the main thread with the session terminating unexpectedly (2021r1.1):

WebPage1.Link1.URL = WebPage2.TextField1.Text

It took me two hours to find this unrelated silent bug which required:

WebPage1.Link1.URL = WebPage2.TextField1.Text.DefineEncoding(Encodings.UTF8)

Could we please please please have all undefined encodings - even those internal to Xojo such as this - be defined UTF8 by default? All this undefined stuff while being non-committal is technically correct I suppose, yet makes our code unsafe and very expensive to stablilize (irony: not stabilise).


Totally agree with Eric, this would be very useful and save a lot of code and unexpected errors …

The text field was read-only and set from a dictionary populated by a string from a JSONItem from a URLConnection’s content received event BTW.

titlecase - I’ve just bumped into .titlecase not working. Tracked it down to an encoding issue - coming from a Dictionary.

Web2 has multiple Encodings issues … I reported this about 5 months ago: <>

1 Like