Fixed segfault unsupported encodings