When you specify LE you are overriding any useful information that the BOM 
could convey... see 
https://softwareengineering.stackexchange.com/questions/370088/is-the-bom-optional-for-utf-16-and-utf-32.

?Encoding

On February 28, 2024 5:44:49 AM PST, "Ebert,Timothy Aaron" <teb...@ufl.edu> 
wrote:
>Dear R-help,
>    I am having trouble reading a UTF-16LE formatted file. The issue appears 
> to be a byte order mark at the beginning of the file. I have tried 
> readLines(file, encoding='utf-16LE') but got me 
>
>[1]"\xff\xfe1" ""      ""      ""      ""      ""
>
>
>
>Regards,
>Tim
>
>
>
>
>______________________________________________
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to