I am using Windows 7, R2.15.3 and RStudio 0.97.320 with knitr 1.1. I don’t know what my version is pandoc, but I downloaded it a couple of days ago.
sessionInfo ()
R version 2.15.3 (2013-03-01) Platform: x86_64-w64-mingw32 / x64 (64-bit)
locale:
[1] LC_COLLATE=Spanish_Argentina.1252 LC_CTYPE=Spanish_Argentina.1252 LC_MONETARY=Spanish_Argentina.1252
[4] LC_NUMERIC=C LC_TIME=Spanish_Argentina.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_2.15.3
I would like to get my reports in both htmlWord and Word, so I use markdown and pandoc. I write in Spanish with emphasis on vowels and tildes on n: á-úand ñ.
I read a lot of posts and I see problems similar to the one I have been resolved with new versions knitr. But there is one problem for which I did not find a solution.
, 'system default', RStudio, .. ISO 8859-1, RStudio . , Word, pandoc . , , , iconv:
iconv -t utf-8 "myfile.md" | pandoc -o "myfile.docx" | iconv -f utf-8
pandoc's utf-8, - pandoc , :
pandoc: `figure/Parent.png ', ...
, pandoc . .md hex, , , :

, , ... ,
, , RStudio utf-8 . . , - , pandoc Word 2 Rmd :
Parent - SAVED WITH utf-8 encoding in RStudio
========================================================
u with an accent: "ú" SAVED WITH utf-8 encoding in RStudio
```{r fig.width=7, fig.height=6}
plot(cars, main='Parent ú')
```
:
Child - SAVED WITH utf-8 encoding in RStudio
========================================================
u with an accent: "ú" Child file
```{r fig.width=7, fig.height=6}
plot(cars, main='One File Child ú')
```
RStudio, 2 Word pandoc.
, . , :
```{r CallChild, child='TestUTFChild.Rmd'}
```
, utf-8 ISO 8859-1. pandoc , utf-8.
- , :
1. pandoc , ISO 8859-1. Windows-1252, , sessionInfo, .
2.. , utf-8 - . - , .
!