Fix History.txt processing for empty LANG

When LANG=UTF-8 some versions of ruby are not able to correctly process
the History file and raise an encoding exception (notably, FreeBSD).

This ensures the History text is processed with UTF-8 encoding.