# 1. open a connection to your file, specifying its encoding f <- file("myUTF16file.txt", encoding = "UTF-16") # 2. Read the data with readLines. Text read from the file is converted to # uft8 or latin1 input <- readLines(f) # close the file connection. close(f)