That will be useful for translated texts, but also for a few other situations, like when exporting a wiki page on the console (`print text`). In that situation, I noticed the previous version of `print_console` was not robust enough, as you easily get unicode code points for which no encoding exist in the console charset, hence we need to use the 'replace' mode.
Closes #7241.