added encoding latin-1 for compatability in R17