Ruchardet

An R port of http://code.google.com/p/uchardet/ library

Install

library(devtools)

install_github('Ruchardet', 'haven-jeon')

Example

library(Ruchardet, quietly = TRUE)

nm <- '안녕하세요! 고감자입니다'
benc <- detectEncoding(nm)
benc
nme <- iconv(nm, benc, "CP949")
detectEncoding(c(nm, nme))

#detection of unknown file encoding
unknown <- file.path(system.file("tests",package="Ruchardet"),"shift_jis.txt")
read.table(unknown, fileEncoding=detectFileEncoding(unknown))


#URL encoding detection 
detectFileEncoding('http://www.ppomppu.co.kr/')
detectFileEncoding('http://freesearch.pe.kr')


haven-jeon/Ruchardet documentation built on May 17, 2019, 3:06 p.m.