Hello there,
awesome to see that mustache.sh exists
While using it as a library in an UTF-8 system (vanilla debian Wheezy)
it has the strange tendency of borking characters
as in
echo "télétransmettre" | mustache
# => tltransmettre
So, initially I assumed that mustache.sh, just has a "favourite" encoding
I searched the github page and found no information on the subject
So I tried
echo "télétransmettre" | mustache > /tmp/what-is-mustache.sh-encoding
file -bi /tmp/what-is-mustache.sh-encoding
# => text/plain; charset=iso-8859-1
and supposed it was iso-8859-1, but no such luck
echo "télétransmettre" | iconv -f utf-8 -t iso-8859-1 | mustache | iconv -f iso-8859-1 -t utf-8
# => tééransmettre
So I tried "brute-guessing" what would be mustache.sh's encoding
iconv --list | while read ENCODING
do
echo $ENCODING
echo "télétransmettre" | iconv -f utf-8 -t $ENCODING | mustache | iconv -f $ENCODING -t utf-8
done
which gave-me surprisingly UTF7 as a working encoding for mustache!? (I did not even know that UTF7 exist at all)
echo "télétransmettre" | iconv -f UTF7 -t iso-8859-1 | mustache | iconv -f iso-8859-1 -t UTF7
# => "télétransmettre"
While this works on Debian, my production machine (AIX) has no UTF7 support, so currently I am more inclined to seek an alternative (mustache.pl probably)
So this issue is for 3 purposes
- Can mustache.sh please support UTF8?
- Failing that Can you at least confirm if my guess of UTF7 is correct or just dumb luck?
- Can you please at least put on the project page a note stating that mustache.sh is encoding dependent and stating the encoding?
Have a nice day!