diff -u --recursive R-rc/src/library/utils/R/Sweave.R R-rc-patched/src/library/utils/R/Sweave.R --- R-rc/src/library/utils/R/Sweave.R 2009-09-28 00:05:26.000000000 +0200 +++ R-rc-patched/src/library/utils/R/Sweave.R 2009-10-19 13:24:17.000000000 +0200 @@ -541,6 +541,7 @@ output <- sub("\n[[:space:]]*$", "", output) if(options$strip.white=="all") output <- sub("\n[[:space:]]*\n", "\n", output) + if(Encoding(output)=="UTF-8") output <- iconv(output, from="utf-8") } cat(output, file=chunkout, append=TRUE) count <- sum(strsplit(output, NULL)[[1L]] == "\n")