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

encoding bug? #6

Open
maelle opened this issue Sep 17, 2018 · 0 comments
Open

encoding bug? #6

maelle opened this issue Sep 17, 2018 · 0 comments

Comments

@maelle
Copy link
Member

maelle commented Sep 17, 2018

stylesheet <- xml2::read_xml("https://raw.githubusercontent.com/ropenscilabs/tinkr/master/inst/extdata/xml2md.xsl")
doc <- readLines("https://raw.githubusercontent.com/ropensci/roweb2/master/content/blog/2013-11-21-rgbif-changes.md",
                 encoding = "UTF-8")
doc <- commonmark::markdown_xml(doc)
doc <- xml2::read_xml(doc)
output <- xslt::xml_xslt(doc, stylesheet)
regmatches(output, regexpr(".partements", output))
#> [1] "©partements"
regmatches(toString(doc), 
           regexpr(".partements", toString(doc)))
#> [1] "épartements"

Created on 2018-09-17 by the reprex package (v0.2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant