test $ipsec_loglevel before foreach
utf-8 encoding
fix from upstream
fix language=JavaScript
fix language=JavaScript