The script is broken on utf-8 systems for some localizations
Description:
While testing the new zenity 4.0 I came across audio-convert. At first I thought the new zenity release broke it, but it was actually something else. If I switch my LANG to C it was working fine. By looking at the script from the terminal I saw lots of unknown characters for my localization (de*). So I checked the encoding:
file -i /usr/bin/audio-convert
/usr/bin/audio-convert: text/x-shellscript; charset=iso-8859-1
Since my LANG is 'de_DE.UTF-8' this was to be expected. So I translated it
# mv /usr/bin/audio-convert{,b}
# iconv --from iso-8859-1 --to utf-8 -o /usr/bin/audio-convert /usr/bin/audio-convertb
And surely that did the job.
Steps to reproduce:
This can be reproduced in de_DE.UTF-8, so just by setting it it should be broken.
pacman -S audio-convert
LANG="de_DE.UTF-8" audio-convert
Additional info:
- package version(s): 0.3.1.1-9
- config and/or log files: Output.txt
- link to upstream bug report, if any: I'm not sure this is a bug and the project doesn't seem to be active at all
😄
Now I'm not sure how to deal with this otherwise. Most of our available script are us-ascii, but this doesn't support the required set of chars and I believe most people do use utf-8, because of the installation guide this should be fair to do.
file -i /usr/bin/* | grep -E 'shellscript|plain' | awk '{print $3}' | sort | uniq -c
5 charset=binary
1 charset=iso-8859-1
436 charset=us-ascii
16 charset=utf-8