I have encountered similar problems in a question for C# using the template suggested by Richard.
Inside the question author's answer I used the German chars "ä" and "ü", wich are quite common in German.
The template script gives an error although the C#-program works with these chars.
The question author can avoid ä, ü, Ä, Ü and ß, if he knows that but students would use them in their answers.
Then they will get a "not correct" grade, and do not know the reason.