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
Ñ crashes pandoc #242
Comments
It seems that something funny is going on with encondings. I saved the file with UTF-8, knit it myself and then used the console to transform it to HTML and it works. |
If it's really the same issue as #134 (and it looks like it is) then you should only see it if you're making an |
It works with |
If it helps further. This works with
|
This works too:
but this with Ñ doesn't work. Which totally beats me why it works in the title but it won't work anywhere else At least gives me a workaround for now |
I belive it's a pandoc issue, not an rmarkdown one. And it has to do with the use of custom templates. Using the default sample.lua also breaks this. And the latest pandoc version |
@lselzer There is an encoding bug in knitr 1.6, but I do not know if it is related to the issue here. Anyway, do you mind testing the current development version of knitr? install.packages('knitr', repos = c('http://rforge.net', 'http://cran.rstudio.org'),
type = 'source') |
I tried with the dev version and it still fails with the same error. sample.lua
|
I have tried it on another machine. Fresh Win7, R, and Rstudio. And still fails with Ñ. It's strange it doesn't fail when the Ñ is on the yaml header. |
Hi all, I hope we can figure out the way to produce ioslides in Turkish also.. Thanks in advance!!title: "Untitled" output: ioslides_presentationR Markdownğ -----Here what I got:------ rmarkdown::render("hello.md") ----session info:------
locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
I got the same problems with German characters: lowercase Umlauts (ä, ö, ü) work fine but uppercase Umlauts (Ä, Ö, Ü) as well as the sharp s (ß) produce the I've created two sample presentations, one is an ioslides presentation which has the error, the other one is a Slidy presentation which works fine. First, the ioslides presentation (
Here's the full error:
Second, everything work fine with Slidy output (
If I include
Now, if I look at the file encodings I actually see a difference: In a MinGW console in the directory where I saved my presentation
Note that I have configured RStudio to encode all source files as UTF-8. And if I remove the Umlauts and the sharp s from the
The templates included in the rmarkdown package are located here on my machine:
If I check file encodings in these directories I get this for isolides:
and this for Slidy:
So why is it that the Sorry for the long post, but hopefully this helps somebody to figure out what goes wrong here... |
I'm wondering whether this is similar to jgm/pandoc#2101
|
It will be nice if everybody who had the problem could test the latest development version of rmarkdown (which aimed to fix the similar issue #134): devtools::install_github('rstudio/rmarkdown') |
Ah, yes; should've checked it first. @jmcphers you mentioned some chars fail the conversion even with the change. I'm curious as to which ones. I find these files helpful for testing: |
@yihui Just github-installed the dev version of rmarkdown as suggested, and now my ioslides test presentation renders capital German umlauts (Ä, Ö, Ü) and the sharp s (ß) perfectly, without errors. Thanks! |
This should make it onto CRAN within the next 3-4 weeks. J.J. On Wed, Apr 22, 2015 at 4:56 AM, Matt Flor notifications@github.com wrote:
|
I can confirm that the fix works for spanish characters. Thank you very much!! |
I still having this problem only when I am using strange characters in knitr::kable command and I am running a notebook. Other situations it is working for me |
@ldeassis Could you provide a minimal, self-contained, and reproducible example? Please also include your session info: devtools::session_info('rmarkdown') |
Code
R Notebook Hide devtools::session_info('rmarkdown') Session info ------------------------------------------------------ setting value version R version 3.3.1 (2016-06-21) system x86_64, mingw32 ui RStudio (1.0.44) language (EN) collate Portuguese_Brazil.1252 tz America/Sao_Paulo date 2016-11-17 Packages ---------------------------------------------------------- package * version date backports 1.0.4 2016-10-24 base64enc 0.1-3 2015-07-28 bitops 1.0-6 2013-08-17 caTools 1.17.1 2014-09-10 digest 0.6.10 2016-08-02 evaluate 0.10 2016-10-11 highr 0.6 2016-05-09 htmltools 0.3.5 2016-03-21 jsonlite 1.1 2016-09-14 knitr 1.15.1 2016-11-17 magrittr 1.5 2014-11-22 markdown 0.7.7 2015-04-22 mime 0.5 2016-07-07 Rcpp 0.12.7 2016-09-05 rmarkdown 1.1.9017 2016-11-17 rprojroot 1.1 2016-10-29 stringi 1.1.2 2016-10-01 stringr 1.1.0 2016-08-19 yaml 2.1.14 2016-11-12 source CRAN (R 3.3.2) CRAN (R 3.3.0) CRAN (R 3.3.0) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) local CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.1) Github (ace87ba) CRAN (R 3.3.2) CRAN (R 3.3.1) CRAN (R 3.3.1) CRAN (R 3.3.2) The problem is when I use foreign chars in kable, take a look: Hide abc <- data.frame( a=as.factor(c(rep("Não",10), rep("Também Não", 10))), b= rnorm(20) ) knitr::kable(abc) Error in gregexpr(calltext, singleline, fixed = TRUE) : regular expression is invalid UTF-8 pandoc.exe: Cannot decode byte '\xe3': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream running command '"C:\Program Files (x86)\Pandoc/pandoc" +RTS -K512m -RTS "C:\Users\leona\AppData\Local\Temp\Rtmp8oZDZD_rs_md_3a942a5b24ea.md" --to html --output "C:\Users\leona\Documents\Survey Design.Rproj.user\DC6E55D\unsaved-notebooks\A384F7A8\1\cz2xmjj6omkax_t_rs_html_3a942a18aa7.html"' had status 1Error: pandoc document conversion failed with error 1 LS0tDQp0aXRsZTogIlIgTm90ZWJvb2siDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KYGBge3J9DQpkZXZ0b29sczo6c2Vzc2lvbl9pbmZvKCdybWFya2Rvd24nKQ0KYGBgDQoNClRoZSBwcm9ibGVtIGlzIHdoZW4gSSB1c2UgZm9yZWlnbiBjaGFycyBpbiBrYWJsZSwgdGFrZSBhIGxvb2s6DQoNCmBgYHtyfQ0KYWJjIDwtIGRhdGEuZnJhbWUoDQogIGE9YXMuZmFjdG9yKGMocmVwKCJOw6NvIiwxMCksIHJlcCgiVGFtYsOpbSBOw6NvIiwgMTApKSksDQogIGI9IHJub3JtKDIwKQ0KKQ0KDQprbml0cjo6a2FibGUoYWJjKQ0KYGBg De: Yihui Xie [mailto:notifications@github.com] @ldeassis https://github.com/ldeassis Could you provide a minimal, self-contained, and reproducible example? Please also include your session info: devtools::session_info('rmarkdown') — |
@ldeassis I only need the Rmd file when you send your reproducible example, which can simply be pasted here or uploaded on Github as a zip file. You can come to Github and see how your reply looks like (not very readable). Anyway, I cannot reproduce your issue with this example:
I saved it as test.Rmd with the UTF-8 encoding, and rendered with |
The problem, I guess, is not with render command itself, it is on ‘Preview’ command in rstudio, I tested again using render and … no error, but, when I use rstudio ‘preview’ command, I can find the problem using your code, by the way Leonard De: Yihui Xie [mailto:notifications@github.com] @ldeassis https://github.com/ldeassis I only need the Rmd file when you send your reproducible example, which can simply be pasted here or uploaded on Github as a zip file. You can come to Github and see how your reply looks like (not very readable). Anyway, I cannot reproduce your issue with this example: output: html_notebookabc <- data.frame(
a=as.factor(c(rep("Não",10), rep("Também Não", 10))),
b= rnorm(20)
)
knitr::kable(abc) I saved it as test.Rmd with the UTF-8 encoding, and rendered with rmarkdown::render('test.Rmd', encoding = 'UTF-8'). — |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Hi, the Ñ letter is very common in spanish. Using it crashes pandoc.
Using the knit button I get
I tried changing the encoding between ISO-8859-1 and UTF-8 but still fails.
I believe it's related to issues #170 and #134
Any workaround?
The text was updated successfully, but these errors were encountered: