Further refactoring of translateChar and installTrChar. Handling encodings in installCharSXP