Hi, The following command brings up a mail composition dialog with blank subject instead of the subject 안 as expected on my system with gawk installed: xdg-email aaa@aaa.com --subject "안" However, this works fine on systems that use mawk (such as Feisty). The problem is within the awk code embedded in the url_encode function: -- snip -- for ( i=1; i<=length ($0); ++i ) { c = substr ($0, i, 1) if ( ord [c] > 127 ) { -- snip -- In gawk, string manipulation functions such as length are unicode-aware and return the number of unicode characters instead of the number of bytes. This would usually be a good thing, but in this case the unicode character should be broken up into bytes to be encoded properly. Setting LANG and LC_ALL to C right before this snippet tricks awk into thinking the string is ascii and processes it accordingly.
Created attachment 12408 [details] Patch suggested by Lei Zhang
Created attachment 50159 [details] [review] re-diffed patch Confirming, came across this issue when testing attaching PDF file with extended characters in the name: > $ XDG_UTILS_DEBUG_LEVEL=99 ./xdg-email ... --attach /tmp/Nabídkový_rozpočet_vše.pdf > Running thunderbird -compose "....,attachment='file:///tmp/Nab%EDdkov%FD%5Frozpočet%5Fvše.pdf'" Attaching re-diffed patch.
Forgot to tell that my system locale is "en_US.utf8" as a standard nowadays.
Thanks! commit 66537d6ac9d44e14e91ccca77536345338af0e62 Author: Rex Dieter <rdieter@fedoraproject.org> Date: Fri Aug 12 09:04:33 2011 -0500 * xdg-email fails with unicode strings if using gawk (BR13139)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.