Hello every one!
It’s about PLCNext Engineer 2024 LTS and controller FW 2023.6.
I would like to attract your attention to the issue of String datatype with Cyrillic content. It converts to „?“ sign in case of static binding.
изображение.pngOr abracadabra of ASCII symbols when try to change value of variable dynamically.
изображение.pngизображение.png
Same code line in IDE 2023.9
изображение.pngOperates as expected.
How can be fixed?
Best regards.
Can you clarify if the type of the string variable is STRING or WSTRING ?
Hello, Martin!
The datatype of reported issue is STRING.
I have to use it because other library FBs does not support WSTRING for parameters input/output in most cases (DBFL_SQL CODE FB for instance).
I will pass on these observations about the inconsistencies in the entry and display of Cyrillic characters in PLCnext Engineer (and in different versions of Engineer), however please be aware that the STRING type is explicitly designed so that „Each character is represented by one byte.“
Elementary Data Types according to IEC 61131-3 ');\n mywindow.document.close(); \n mywindow.focus();\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 1000)\n return true;\n}\r\n\r\n\r\n Since it’s not possible to represent a Cyrillic character as a single byte (using ANSI encoding), you shouldn’t rely on multiple bytes in a STRING being interpreted in UTF format. The fact that this appears to be the case in some circumstances should be considered an anomaly, and not considered „correct“ behaviour.
In cases where a string must be interpreted in UTF format, a WSTRING should be used. If there is a function block that does not support WSTRING variables, then please request this using the „Contact Developer“ button on the product page in the PLCnext Store.
cp1251_to_utf8.7zThe problem is that previously I could encode Cyrillic as cp1251 format, and it was acceptable workaround, and now it is impossible.
Attached FB was successfully used for IDE prior to 2024 LTS…
I have passed on these observations to the PLCnext Engineer support team.
Is it simply a display issue? That is, does the STRING variable in PLCnext Engineer contain the same sequence of bytes in both cases (2023.9 and 2024.0)?
No, that is not just display issue (as if we try to display dynamic string variable to HMI).
PLC value of variable became unreadable ‚???‘ and could not be processed in case of Cyrillic symbols.
And yes, for IDE 2023.9 and 2024 there is screenshots of the same value binding.
My question is:
In PLCnext Engineer version 2023.9, after this assignment:
… if you then put STRING_VAR into a STRING_TO_BUF function block instance, what are the resulting values of bytes 0, 1, 2, etc. in the output buffer?
Then, in PLCnext Engineer version 2024.0, after this assignment:
… if you then put STRING_VAR into a STRING_TO_BUF function block instance, what are the resulting values of bytes 0, 1, 2, etc. in the output buffer?
If the bytes have the same value in both versions, then it’s a display issue. If the bytes have different values in both versions, then there is a deeper problem.
Sorry for misunderstanding.
Here screenshot of IDE2023-9 program version
And here screenshot of IDE2024-LTS
As you can see, buffer values are different.
Also, please find sample programs attached.
STRING_TEST.7zHope this will assist in clarifying of the problem.
Best regards.
Thanks, the problem is now clear.
It’s very strange that PLCnext Engineer now replaces some characters with a question mark character, and that this new behaviour is not mentioned in the Change Notes. I have given this information to the PLCnext Engineer support team, and I hope that they will give an answer here.
Thanks, Martin!
Looking forward for your soon reply.
Team, Merry Christmas and a Happy New Year!)))
So, as PLCN ide 2024.0.2 LTS is now avaliable, wish Cyrillic issue was fixed, but it’s still present.
And no any helpful feedback from support team…
Hello, team!
There is PLCN ide 2024.0.3 LTS is now available, but Cyrillic issue is still here. Does some body of support or development team are in touch with this problem. Or it is only one way, pull over to the roadside for a picnic with ide2023-9 for the end of times?..)
Hope some one will pay attention to this.
BR
Hi Oleksandr,
I’m not a member of the support team but I am a ‚some one‘ and I’m curious. I couldn’t even use cyrillic characters as STRING in 2023.9. Am I missing something? PLC is an AXC F 2152 with FW 2023.6

Hello, Oleksandr,
I’m actual prduct manager by that product in Ukraine.
We have similar problems (links desappear) periodicly due to updating our web-site, so I’m sorry, for that discomfort.

BR
Hi Oleksandr,</p>I’m not a member of the support team but I am a ‚some one‘ and I’m curious. I couldn’t even use cyrillic characters as STRING in 2023.9. Am I missing something? PLC is an AXC F 2152 with FW 2023.6 </p>[https://forum.plcnext-community.net/uploads/SBG9J839GY0V/image.png</a></p>
Hello, DivisionByZero!
You probably hi-lite collation issue for PLCNEng installation in case of OS different language settings… It seems, need to dive in deeper…
BR
Hi Oleksandr,
We’d recommend use WSTRING in PLCnext Engineer for a cyrillic character set you need to.
The use of STRING is not permitted.
BR
Hi Oleksandr,</p>We’d recommend use WSTRING in PLCnext Engineer for a cyrillic character set you need to.</p>The use of STRING is not permitted.</p>BR</p>
But if I need to transfer some text data to database, or other lib fb, which support only STRING input type? Previous versions freely allow to implement workaround. Till now.
WSTRING contain additional zero signs for ASCII characters, and it also limit it’s use in various cases.
BR
So, now it become more clear, what is going on.
1.IDE 2024.x.x now is more strictly monitor that STRING datatype constants consists only from one byte symbols. And generate warnings, if it is not.

This cause ??? signs for Cyrillic symbol sets, and other, that require 2 byte encoding.
2.STRING datatype now display STRING values as UTF8 encoded symbols. And it is still possible to make STRING display and operate with Cyrillic symbols but you have to decode it from UTF16 of WSTRING to 2 byte UTF8 implementation.
LEN() calculates actual quantity of bytes correctly.
Now IDE display UTF8 STRING in more readable way, then previous IDE versions. Previously, often there was abracadabra
3.This workaround assist me to deal with PLC generated log records to MySQL via DBFL_SQL_8 without additional configuration of MySQL my.ini file. (Previously have to set character-set-server:=cp1251). And DBFL_SQL_8 FB blocks dial with such complicated STRING without errors.
As a conclusion.
Limitation of STRING with one byte ASCII char set only, seems artificial. Especially if we see that we deal with UTF8 under the hood.
BR