[R] Sweave and uttf-8 under Windows XP
murdoch.duncan at gmail.com
Thu May 20 12:07:38 CEST 2010
Sven Garbade wrote:
> Hi list,
> I need to process a Rnw file and and a csv file (both are encoded in
> UTF-8) under Windows XP (R Version 2.11.0, i386, mingw32).
Take a look at this post:
which discussed this issue recently.
> I can source and run the Rnw file:
> Writing to file Bericht.R
>> source(file("Bericht.R", encoding="UTF-8"))
> which runs fine, but running Sweave() failed:
> Writing to file Bericht.tex
> Processing code chunks ...
> 1 : term verbatim
> 2 : term verbatim
> Fehler: chunk 2
> Error in parse(text = chunk) : Unerwartetes Eingabe in:
> My first idea was to run Sweave like Sweave(file("Bericht.Rnw",
> encoding="UTF-8")), but Sweave seems to expect a file name as a
> character rather a connection. The Rnw and csv file were created under
> Linux in a UTF-8 locale and were further processed by xelatex.
> Are there any ideas to get Sweave working? I would be nice when the
> file encoding can be left in UTF-8.
> Thanks, Sven
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help