You need to pass the encoding as a string; put quotes around UTF-8 . Also, it is readAsText , not readAsDataText :
reader.readAsText(f,"UTF-8");
Or you can simply completely abandon the encoding, in which case it will try to automatically detect UTF-16BE or LE, and if this is not one of them, it will use UTF-8 by default.
reader.readAsText(f);
source share