R package to detect character encoding