I have a string item linked with the message channel. If I assign a value to this string sometimes the telegram is sent, sometimes is not. I’ve made several tests and concluded the following:
If the item only contains letters, numbers, blanks and special characters (,.() the telegram is sent
But if the item contains any accented letter, such as á, or national character, such as ç, the telegram is not sent
I’m able to send telegrams with accented letters using Firefox. What could be be problem with the HTTP binding ?
Looks like http binding is producing escapes for blanks but not for national characters. Could this be automated in the binding ? Or do I need to use a transformation ?
If I modify the item name from Portão to Portao the telegram is sent.
I checked that it behaves like the documentation: the used constructor for the URI escapes “illegal” characters. “Space” is an illegal character and gets escaped. UTF-8 characters are not “illegal” according to the spec and therefore are not escaped. Unfortunately other parts of the chain (in this case the receiving server) are more strict.
URLEncoder is not properly encoding some characters (e.g. it uses + instead of %20 for spaces), so that is not a solution. Yes, an issue on GitHub might be a good idea, so someone can pick it up.
Hmm, this is about the characters that the target external server finds acceptable. One user’s encoding needs are not the same as another’s (and so we have transformations available).
I’ve tried encodeURIComponent() in a JS transformation. It seems to encode blanks and national characters correctly, but unfortunately if I use it in a transformation I get a telegram Urgente%20-%20Inunda%C3%A7%C3%A3o%20Cave instead of Urgente - Inundação Cave
Reminder - this about what the target server accepts, not about doing stuff by default in the HTTP binding. User-selectable transformations seem like the correct approach, to suit everyone.
Find out what Firefox did to the URL that you typed in.
The http binding included in 3.3.0.M1 works but national characters are converted to invalid characters. Shall I revert to SmartHome/J HTTP Binding ? What’s the reason to have several versions in the marketplace ?