use locale encoding instead of hardcoded utf-8