[cmake] Another patch for doc building related to locale

C.UTF-8 seems to exist only on ubuntu, debian nowadays. So, try to
detect automatically what UTF-8 locale exists on the system, and choose
the first one.

XXX Probably does not work on windows at all.