CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

problem with unicode string input into text field
https://forum.codesys.com/viewtopic.php?f=25&t=9331
Page 1 of 1

Author:  audi0615 [ Fri Nov 23, 2018 5:19 am ]
Post subject:  problem with unicode string input into text field

Hi.

I have a problem on writing unicode strings (Korean characters) into a text field in web-visu.
I am able to write unicode strings, however if i don't press "Enter" key and click other controls or area on the screen, the displayed strings is changed to strange characters.
If i press "Enter" key to complete text input, then the strings are displayed correctly.

1) type Korean and press Enter key --> OK
Attachment:
2018-11-23_13-06-18.png


2) type Korean and mouse click other area on the screen without pressing Enter key --> changed to strange strings.
Attachment:
2018-11-23_13-07-16.png


following is setting i used,
- check "Use Unicodestrings" in the visualization manager setting
- input type of the text field is "text input" (using hardware keyboard)
- change font of the text field to Korean font

test environment is codesys V3.5 SP13 patch2 + web visu

your help would be appreciated.

Best regards

Y.M. Kim

Author:  m.prestel [ Fri Nov 23, 2018 10:03 am ]
Post subject:  Re: problem with unicode string input into text field

Hello Sir,

can you try to use a WString instead of a String?
The reason is:
Code:
The data type WSTRING is interpreted in Unicode format as opposed to the data type STRING (ASCII).

See https://help.codesys.com/webapp/_cds_da ... n=3.5.13.0

Best regards,
Marcel

Author:  audi0615 [ Fri Nov 23, 2018 11:33 am ]
Post subject:  Re: problem with unicode string input into text field

Mr. Marcel

Thank you for your reply.

the text variable for the text field control is already WSTRING.

if i press ENTER key after typing unicode string, it is displayed and saved to the variable correctly.

the problem is, if i don't press ENTER key and the text field looses focus by mouse click on other control or other area of screen, the unicode string changes to strange one.

this is quite a serious issue since my customer might not press ENTER after typing into a text field control.

Thanks anyway.

Author:  m.prestel [ Fri Nov 23, 2018 12:13 pm ]
Post subject:  Re: problem with unicode string input into text field

Hello sir,

I am sorry but I cannot reproduce this issue in the webvisu.

Do you mind reducing your project to a minimum and provide some steps to repeat so I can recheck and maybe add an issue?

Thank you!

Best regards,
Marcel

Author:  audi0615 [ Fri Nov 23, 2018 12:57 pm ]
Post subject:  Re: problem with unicode string input into text field

Dear Mr. Marcel

Thank you for your response.

I have recorded the issue.

please refer to following link.

https://youtu.be/CuHsP_CgQz4

Author:  audi0615 [ Fri Nov 23, 2018 1:41 pm ]
Post subject:  Re: problem with unicode string input into text field

Dear Mr. Marcel.

I've just found out that this issue only happen in CODESYS Development System when logged in.

the same issue is not found on PLC runtime.

Best regards.

Y.M. Kim

Author:  m.prestel [ Mon Nov 26, 2018 8:05 am ]
Post subject:  Re: problem with unicode string input into text field

Hello Sir,

thank you for clearing that up.

Kind of went insane trying to reproduce this in a browser (because you said webvisu).

Adding an issue for that in the database.

Best regards,
Marcel

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/