Thanks to @MartinDabbelJuSmelter for his answer, which essentially captures what happens. However, there are simpler solutions for this. The easiest way:
exams2pdf("file.Rmd", encoding = "UTF-8", template = "plain8")
which leads to the desired result. Why is it so complicated and why is it so poorly documented?
This is difficult due to the modular structure of the exams package. There are so many different ways to combine different building blocks, something simple, since it takes two arguments. First, you must declare that file.Rmd is in encoding UTF-8. Secondly, you should use a template that supports UTF-8. The exams package comes with a simple plain template with UTF-8 enabled.
In different encodings, there are no more LaTeX templates, etc., because we expected that almost all users would want to use their own template in any case. For example, to display the name of your university or its course, or use a specific style / font, etc.
If you have only questions with one choice ( schoice ) or multiple choice ( mchoice ), then there is also exams2nops , which offers a standardized format in which it is much easier to use (but also with less settings). For an impression see:
exams2nops(c("anova.Rmd", "tstat2.Rmd"), language = "pt", encoding = "UTF-8")
So you cannot use your num file.Rmd question for this. But the big advantage if you include it in the schoice question is that you get an automatic scan and rating for exams2nops .
So now for the Achilles heel: poor documentation. In my defense, I have to say that in section 2.3 (Creating the first exam) vignette("exams2", package = "exams") the encoding problem is briefly discussed, and we recommend that you look at the result of exams_skeleton() to see how it works. So in your case
exams_skeleton(markup = "markdown", encoding = "UTF-8")
should have provided some useful examples.
But perhaps it should be easier to find. The best documentation page for exams is high on my wish list - especially for beginners to guide - but this summer I didn't find the time I needed. Hopefully next year ...
PS: The following lines at the beginning of the Rmd file are completely unnecessary and are ignored by exams :
The result in which each exercise is exams2 is determined by the exams2 xyz functions, and not by the exercise files themselves. For instance:
exams2html("foo.Rmd", encoding = "UTF-8", template = "plain8")
The reason the function (and not the Rmd file) decided about this is simple: users usually want to create a large pool of questions, and then they may want to use the same question in a PDF file (for a written exam) or for Moodle or for direct voting through ARSnova etc. If you had to modify the question pool for this each time (or keep copies), it would be rather cumbersome.