Preferences: Adjust size to current page on page change.
[code] Explicitly set UTF-8 codec when using QTextStream.

Fixes encoding issues on Windows.

Closes #769