Fix plugin's crash in some system default encodings.