Hi Dojo,
I have created script in which we can add some data into table on the element. That data sometimes has special characters (ä, ö, æ, ø and å). When we apply adding data with special characters, there is no change. I have tried to enter data from element itself and it doesn't work also (it's not Unicode protocol). On the web interface, we can add data with special characters, and it will be correctly parsed on element side.
Does someone know is this issue happens because protocol is not Unicode type or I need to dig deeper to investigate issue?
For me, only confusion is that we can parse those special characters and correctly show them on element, but we can set those special characters from element itself.
Non-ascii characters don't work well when a protocol is not Unicode. That's because the protocol expects to receive ASCII data from a device. The SLProtocol logic is built to then work entirely with ASCII data.
Ideally, the driver is set to work with unicode data, which invalidates any pre-existing elementdata, and may break serial communication if the device doesn't expect to receive this encoding. The data would have to be serialized and set through a QAction as binary data. However, this can be flagged using the ascii option as described in the documentation: ascii attribute | DataMiner Docs
There are some scenarios where a non-unicode protocol can display unicode text, but it's not a consistent and reliable way to use the element.
Edit: Found a better solution to the ascii problem for serial drivers.