Simplified UTF-8 fix

With regard to pull request #3, I propose this simplification.

I have tested that this code preserves the corrected behavior to saving pages with UTF-8 metadata.

I have also verified that this version will trivially merge into the current master branch of alexex/wiki: bebc55842ae40c0238f7128372dc7768b68790cf.