README.md

ced

GitLab CI Build
Status AppVeyor Build
status Codecov Code
Coverage CRAN
Status License: GPL
v2

R bindings for the Google Compact Encoding Detection library. Key features:

Installation

To install the package from the CRAN run the following command:

install.packages("ced", repos = "https://cloud.r-project.org/")

Also you could install the dev-version with the install_gitlab() function from the remotes package:

remotes::install_gitlab("artemklevtsov/ced")

This package contains the compiled code, therefore you have to use the Rtools to install it on Windows.

Example

# load packages
library(ced)

# detect string encoding
ascii <- "Hello, useR!"
print(ascii)
#> [1] "Hello, useR!"
ced_enc_detect(ascii)
#> [1] "US-ASCII"
utf8 <- "\u4e0b\u5348\u597d"
print(utf8)
#> [1] "下午好"
ced_enc_detect(utf8)
#> [1] "UTF-8"

# detect raw vector encoding
ced_enc_detect(charToRaw(ascii))
#> [1] "US-ASCII"
ced_enc_detect(charToRaw(utf8))
#> [1] "UTF-8"

Bug reports

Use the following command to go to the page for bug report submissions:

bug.report(package = "ced")

Before reporting a bug or submitting an issue, please do the following:

Please attach traceback() and sessionInfo() output to bug report. It may save a lot of time.

License

The ced package is distributed under GPLv2 license.



Try the ced package in your browser

Any scripts or data that you put into this service are public.

ced documentation built on Jan. 14, 2020, 5:10 p.m.