add an extra checking while generating the documentation (due to encoding issue, otherwise it happens later in generate.py - sphinx)