Problem with knit to html in updated R Studio when Rmd in Czech

What should I do when R Markdown output is created but only up until the point where it encouters special Czech character? Then it stops. It worked well for me in a previous R Studio version. I have recently updated R to 4.0.0 and R Studio for Windows 10. I have set Global Options > Code > Saving > default text encoding: CP1250.

Maybe @jlacko could help, please?

Thank you.

You are scaring me! I have updated to 4.0.0 very recently (yesterday to be exact) and I haven't knitted much yet.

For pdf output there is the pdf.options(encoding = 'ISOLatin2.enc') hack, but I have not yet run into issues with html.

Would you mind posting a small reprex known to cause the issue? Something about Žluťoučký kůň úpěl ďábělské ódy or what not?

1 Like

News: when I create a totally new Rmd, it works very well with Žluťoučký kůň úpěl ďábělské ódy. It is my old Rmd that troubles me. Information from R Markdown below:

[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata,
  e.g. by using --metadata pagetitle="..." on the command line.
  Falling back to 'Pilot04_H4-az-H6-v2.utf8'

Output created: Pilot04_H4-az-H6-v2.html
Warning messages:
1: In readLines(con, warn = FALSE) :
  invalid input found on input connection 'Pilot04_H4-az-H6-v2.Rmd'
2: In knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) :
  The file "Pilot04_H4-az-H6-v2.Rmd" must be encoded in UTF-8. Please see https://yihui.org/en/2018/11/biggest-regret-knitr/ for more info.
3: In readLines(con, warn = FALSE) :
  invalid input found on input connection 'Pilot04_H4-az-H6-v2.knit.md'
4: In readLines(con, warn = FALSE) :
  invalid input found on input connection 'Pilot04_H4-az-H6-v2.utf8.md'
```

Does it work also without having latex / miktex?

Mitex is not required (some other distro will do: Tex Live and Tiny Tex have a good reputation) but some kind of LaTeX is necessary.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.