Check encoding before applying htmlentities
Check encoding before applying htmlentities

Fix for #48
stefandoorn/php-debugbar,barryvdh/php-debugbar,PatidarWeb/php-debugbar,getgrav/php-debugbar,maximebf/php-debugbar,snapshotpl/php-debugbar,stefandoorn/php-debugbar,DanPhyxius/php-debugbar,barryvdh/php-debugbar,reignHay/debugbar,stefandoorn/php-debugbar,snapshotpl/php-debugbar,reignHay/debugbar,Big-Shark/php-debugbar,snapshotpl/php-debugbar,maximebf/php-debugbar,barryvdh/php-debugbar,PatidarWeb/php-debugbar,getgrav/php-debugbar,getgrav/php-debugbar,DanPhyxius/php-debugbar,Big-Shark/php-debugbar,reignHay/debugbar,DanPhyxius/php-debugbar,maximebf/php-debugbar,DanPhyxius/php-debugbar,reignHay/debugbar,Big-Shark/php-debugbar,Big-Shark/php-debugbar,stefandoorn/php-debugbar,PatidarWeb/php-debugbar