v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
666 stars 58 forks source link

Something broke something in yad, preventing display of certain symbols #251

Open Sadi58 opened 11 months ago

Sadi58 commented 11 months ago

I currently use YAD under Debian Testing KDE Plasma with a plasmoid/widget in addition to KDialog which is not as feature-rich as YAD. The script that's executed when the plasmoid is clicked stopped working the other day, and I figured out that it has become somehow impossible for YAD to display text containing certain characters like "★" I was using in this script. Replacing it with some others in this bullet list, like "►" and even "·" (middle dot symbol) that can be typed produce the same result. So, I had use a simple hyphen "-" instead as a workaround.

However, it's also worth noting that there's no such problem when I use those symbols in a similar way with KDialog.

There was no recent change in either the plasmoid or YAD installed in my system; so I think it must be due to some other system software update either in Debian Testing base or KDE Plasma DE that affects YAD somehow, which is totally beyond me...

I think probably this is a bug that should be reported to Debian or KDE developers, or some intentional code change that YAD needs to be adapted.

Here is the block of script in question, which I have cleaned a bit to make it easier to read:

mylist="$(grep -v "^$" "/PATH/TO/FILE.TXT" | sed -e "s/^/★ /g")"
yad --form --columns=2 --title "TITLE TEXT" --text="\nBODY TEXT\n<i>${mylist}</i>\n" --image "ICON0" --image-on-top \
    --field="<b>OPTION1</b>!ICON1!TEXT1 :fbtn" "/PATH/TO/EXECUTABLE1" \
    --field="<b>OPTION2</b>!ICON2!TEXT2 :fbtn" "/PATH/TO/EXECUTABLE2" \
    --field="<b>OPTION3</b>!ICO3!TEXT3 :fbtn" "/PATH/TO/EXECUTABLE3" \
    --button="Close!dialog-ok" \
    --geometry "430x250+1265+25"
DocSalvager commented 4 months ago

I too am having this problem.

Am able to insert emojis in a --form TXT field and save it. But on trying to reload the saved file, yad fails without explanation. Seems to be choking on the UTF-8 emoji.