Get “embedded nul(s) found in input” when reading a csv using read.csv()

Your CSV might be encoded in UTF-16. This isn’t uncommon when working with some Windows-based tools.

You can try loading a UTF-16 CSV like this:

read.csv("mycsv.csv", ..., fileEncoding="UTF-16LE")

Leave a Comment