I am using font-awesome 4.4.0 and have expanded the default i3blocks battery script with new battery icons. Everything seems to work correctly, but fa-battery-half Unicode: f242 , which makes the script useless. Unicode also seems to refer to the symbol .
In the terminal, it crashes:
$ perl /usr/share/i3blocks/battery Wide character in print at /usr/share/i3blocks/battery line 65. 28% (01:02) Wide character in print at /usr/share/i3blocks/battery line 66. 28%
script by default, with the exception of the following lines:
if ($status eq 'Discharging') { if ($percent < 10) { $full_text .= ' '; } elsif ($percent < 25) { $full_text .= ' '; } elsif ($percent < 50) { $full_text .= ' '; } elsif ($percent < 75) { $full_text .= ' '; } elsif ($percent < 100) { $full_text .= ' '; } } elsif ($status eq 'Charging') { $full_text .= ' '; }
and
if ($status eq 'Discharging') { if ($percent < 25) { print "#FF003C\n"; } else { print "#000000\n"; } if ($percent < 5) { exit(33); } }
In the editor, the script looks like this:

How can I get the script to work with the fa-battery-half Unicode: f242 .
source share