Good morning everyone
I have an issue with displaying japanese characters in the web visu.
May someone give me a hint what to do?
I have a translated textlist (see attachment). I can download it (no errors) but it displays only question marks (???)
It appears the same way on all devices, on our web panel at the machine, over a web browser from my laptop or from a mobile device.
The text on the main screen are displayed correctly
but not the text in a table.
The table is part of a Structure and the Name is defined as a string.
This string is now displayed weird.
I am still struggeling with this japanese characters.
I changed the data type of the "name* in my structure from string to wstring, i declared ws_text as a wstring as well and
I want to read the textlist with the function "DynamicTextGetTextW". Now it says that the a "string" cannot be converted to
a wstring.
Obviously the return value of this function "DynamicTextGetTextW is always a string and it will display
the wrong codes in my table.
Is there another way to read these Japanese characters and display it correctly in the table?
All other texts, that are not part of this structure are displayed correctly (in Japanese)
Your help is much appreciated. I am new to this field and not well experienced.
Best regards
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good morning everyone
I have an issue with displaying japanese characters in the web visu.
May someone give me a hint what to do?
I have a translated textlist (see attachment). I can download it (no errors) but it displays only question marks (???)
It appears the same way on all devices, on our web panel at the machine, over a web browser from my laptop or from a mobile device.
All other language changes work.
Thanks for your help.
Best regards
Andreas
Hey,
have you checked the box "Use unicode string" in the visu manager?
https://help.codesys.com/webapp/_visu_obj_manager;product=core_visualization;version=3.5.16.0
Best regards,
Marcel
Thank you Marcel!
That was missing.
Have a great day.
Best regards
Andreas
I guess i was too early with celebrating
Now the HMI shows inconsistent characters.
The text on the main screen are displayed correctly
but not the text in a table.
The table is part of a Structure and the Name is defined as a string.
This string is now displayed weird.
Thanks for all answers.
Best regards
Andreas
You have to use wstrings if you want to display non ASCII characters.
Best regards,
Marcel
Thank you Marcel
Thats quite a huge change in the program.
I have to replace all the strings.
Thanks for your help
Andreas
I am still struggeling with this japanese characters.
I changed the data type of the "name* in my structure from string to wstring, i declared ws_text as a wstring as well and
I want to read the textlist with the function "DynamicTextGetTextW". Now it says that the a "string" cannot be converted to
a wstring.
Obviously the return value of this function "DynamicTextGetTextW is always a string and it will display
the wrong codes in my table.
Is there another way to read these Japanese characters and display it correctly in the table?
All other texts, that are not part of this structure are displayed correctly (in Japanese)
Your help is much appreciated. I am new to this field and not well experienced.
Best regards
Andreas
Since it is a pointer, just assign the result of DynamicTextGetTextW to a POINTER OF WSTRING and after that deference it.
Best regards,
Marcel
Thats it, thank you very much!
I would have bought you a beer if you were around
Best regards
Andreas