How to detect the right encoding for read.csv?

后端 未结 6 1841
遥遥无期
遥遥无期 2020-11-27 11:02

I have this file (http://b7hq6v.alterupload.com/en/) that I want to read in R with read.csv. But I am not able to detect the correct encoding. It seems to be a

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 11:55

    In addition to using the readr-package, you may also choose to use stringi::stri_enc_detect2. This function is particularly efficient if the locale is known and if you are dealing with some form of UTF or ASCII: "..it turns out that (empirically) stri_enc_detect2 works better than the ICU-based one [stringi::stri_enc_detect used by the guess_encoding] if UTF-* text is provided."

    Details on stringi::stri_enc_detect.

    Details on stringi::stri_enc_detect2.

    Change-request for guess_encoding

提交回复
热议问题