name. When name is printed, R assumes that name is encoded in UTF-8. Thus, the name is printed with a »wrong« character. Encoding(name)<-, the correct encoding is assigned to the string which causes it to be printed correctly. # name <- '\x52\x65\x6e\xc3\xa9'; name <- '\x52\x65\x6e\xe9'; name # # [1] "Ren\xe9" Encoding(name) <- 'latin1' name # # [1] "René"