Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-ASCII characters #27

Closed
beanumber opened this issue Dec 15, 2017 · 5 comments
Closed

non-ASCII characters #27

beanumber opened this issue Dec 15, 2017 · 5 comments
Assignees

Comments

@beanumber
Copy link
Owner

@beanumber beanumber commented Dec 15, 2017

Version: 0.1.4
Check: data for non-ASCII characters
Result: NOTE
     Note: found 2698 marked UTF-8 strings
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Ugh.

@beanumber beanumber self-assigned this Dec 15, 2017
@beanumber
Copy link
Owner Author

@beanumber beanumber commented Dec 15, 2017

See #17

@nicholasjhorton
Copy link
Collaborator

@nicholasjhorton nicholasjhorton commented Dec 15, 2017

There are pedagogical reasons why we would want to have non-ASCII characters. Any idea why this is now a requirement for CRAN?

@beanumber
Copy link
Owner Author

@beanumber beanumber commented Dec 15, 2017

I have no idea. Cultural imperialism?

Somehow we fixed this before, but I'm running the same code now and it doesn't seem to be working.

> showNonASCII(WorldCities$name)
511: Xank<c2><82><c2><9d>ndi
518: L<c2><82><c2><9d>nk<c2><82><c2><9d>ran
523: Beyl<c2><83><c2><aa>qan
> x <- WorldCities$name
> Encoding(x) <- "UTF-8"
> y <- iconv(x, from = "UTF-8", to = "latin1", sub = "")
> showNonASCII(y)
511: Xank<82><9d>ndi
518: L<82><9d>nk<82><9d>ran
523: Beyl<83><aa>qan
> z <- stringi::stri_trans_general(WorldCities$name, "latin-ascii")
> showNonASCII(z)
511: Xank<c2><82><c2><9d>ndi
518: L<c2><82><c2><9d>nk<c2><82><c2><9d>ran
523: Beyl<c2><83><c2><aa>qan

Ugh, I am at a loss here. Any help would be appreciated!

@nicholasjhorton
Copy link
Collaborator

@nicholasjhorton nicholasjhorton commented Dec 16, 2017

@beanumber
Copy link
Owner Author

@beanumber beanumber commented Dec 20, 2017

OK, that seems to have worked. Thanks @nicholasjhorton !

@beanumber beanumber closed this in 9a68be8 Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.