knitr and UTF8 encoding
问题 A few days ago, I started writing on a german R-Script. Unfortunately, the following code chunk doesn't work when I knit() the document: @ <<>>= äö <- ordered(c(1,3,2,2)) @ Can anyone help me solve this problem? PS: I'm working with Linux. 回答1: Since you are using Linux, things should be easy. It is probably just a LaTeX problem; most importantly, did you specify the encoding of your document? e.g. \usepackage[utf8]{inputenc} . This works for me under Ubuntu. \documentclass[ngerman]{article}