Handle unicode in the config file.

In addition to just allowing unicode values in the config file, it also fixes #2481.