Correct translation
This is something I often encounter as a native speaker of Finnish, another language with gender-neutral pronouns. The solution depends on the context, so it requires some understanding of what is being said, which is why current machine translators perform badly. The problem often has no ideal solution, because choosing "he" or "she" may require information that the source text simply does not contain. Usually one defaults to "he", as "he/she" is too clumsy.
Going the other way also sometimes requires rephrasing the text. "He said, she said" does not translate directly into Finnish.The closest one can get is the use the nouns for "man" and "woman", but it is not quite the same.