I wish to convert an HTML file encoded in ANSI to UTF-8, using R.
Is there a tool, or a combination of tools, that can make this work?
Thanks.
Edit: o.k, I’ve narrowed my problem to another one. It is re-posted here: Using "cat" to write non-English characters into a .html file (in R)
you can use iconv:
tmp2.html should be utf-8.
Edit by Henrik in June 2015:
A working solution for Windows distilled from the comments is as follows:
Update 2021: And if ANSI is the current locale, the following works as well (i.e., uses the local encoding as
fromsource):