RFC: Newlines in TCP binding config strings

This thread is a Request For Comments on a possible change in the way binding config strings are handled by the TCP binding.

Issue 5597 was filed against the TCP binding because the user was unable to use this binding config string successfully:

tcp=">[ON:WagoPLC:2000:'\u0024\u0041\u0003\u0000\u000D\u0002\u0023'], >[OFF:WagoPLC:2000:'\u0024\u0041\u0003\u0000\u000D\u0001\u0023']"

The problem arises because these configuration strings are parsed using a regular expression that does not match newlines (\u000D) using the . wildcard. We could change this by allowing such newlines to be matched (via the so-called “dotall” mode).

I’m currently thinking of creating a new configuration parameter for the binding like allowCRLF. This would default to false, maintaining the current behavior for existing installs. Setting it to true would allow newline characters to be used.

All feedback will be much appreciated.