remi icon indicating copy to clipboard operation
remi copied to clipboard

DropDownItem doesn't work with unicode special characters

Open batzkass opened this issue 7 years ago • 2 comments

Hi, If the a dropdown item text is a unicode string containing special characters, the dropDown.get_value() returns None. However, if you put an "on_click_listener" on the dropDown, the callback function "value" argument will be the right unicode string. This is actually the way I handle this, but it could be useful to get the dropDown value without. Note that the attribute "DropDownItem.attributes['selected']" will not be activated when there is a unicode special char in the text.

You can find a minimal script here : francois.kneib.free.fr/bug_unicode_dropdown.py

batzkass avatar Sep 11 '17 12:09 batzkass

Hello @batzkass , Thank you for reporting. This problem doesn't happen with python3.x, I suggest you to use the most updated python version. I will see how to fix for python2.x. Have you the possibility to switch to a newer python version, or are you vinculated to an older one?

dddomodossola avatar Sep 12 '17 14:09 dddomodossola

I could switch to python 3 in the future, but I lack time now. Anyway, in the case the solution is easy to implement, it could be a good idea to do so. I think about putting "from future import unicode_literals" at the very beginning of the remi scripts. Don't you think it could solve the issue ? It basically tells python to treat all strings as unicode, exactly like python 3 does.

2017-09-12 16:58 GMT+02:00 Davide Rosa [email protected]:

Hello @batzkass https://github.com/batzkass , Thank you for reporting. This problem doesn't happen with python3.x, I suggest you to use the most updated python version. I will see how to fix for python2.x. Have you the possibility to switch to a newer python version, or are you vinculated to an older one?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dddomodossola/remi/issues/196#issuecomment-328868362, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhDwNWLGWE6eDNJU95-uezY49tIOoveks5shpOhgaJpZM4PTGgH .

batzkass avatar Sep 12 '17 15:09 batzkass