Change encoding to utf-8 when needed

Fix 2nd part of https://github.com/geoadmin/mf-geoadmin3/issues/1455