Hi Johas, I've run into a similar problem due to Emacs on OSX setting my locale to "C". If you're on Mac or Linux you can try setting
Sys.setlocale(category = "LC_ALL", locale = "UTF-8") before calling Sweave() Best, Ista This doesn't æ ø å and pdf document only contains NA On Wed, Aug 8, 2012 at 6:15 AM, Jonas Hal <j...@brf.dk> wrote: > Dear all, > > I use Sweave to create my reports. my pdf output contains only NA's whenever > my text contains special Danish characters like ø, ø and å. I have upgraded R > from 2.13 to 2.15 and the scripts worked fine under R 2.13. > > Sweave("Test.Rnw", encoding = "utf8") > texi2dvi("Test.tex", pdf = TRUE) > > %"Test.Rnw" > \documentclass{article} > \usepackage [danish]{babel} > \usepackage[utf8]{inputenc} > \begin{document} > This is a test that works > \end{document} > > %"Test.Rnw" > \documentclass{article} > \usepackage [danish]{babel} > \usepackage[utf8]{inputenc} > \begin{document} > This doesn't æ ø å and pdf document only contains NA > \end{document} > > Any suggestions? > > Best wishes > Jonas Hal > > > > _________________________________________________________________________________________________________________________________________ > BRFkredit sender e-mails og vedhæftede dokumenter i ikke-krypteret form. Hvis > du ikke ønsker at modtage oplysninger fra BRFkredit pr. e-mail, beder vi dig > meddele os det via brev eller e-mail. Denne e-mail kan indeholde fortrolig > information. Hvis du modtager e-mailen ved en fejl, beder vi dig informere os > om det hurtigst muligt. Samtidig beder vi dig slette e-mailen uden at > videresende eller kopiere indholdet. > _________________________________________________________________________________________________________________________________________ > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.