fixed R's character encoding nightmare