Specify encoding when working with strings

This fixes warnings reported by Findbugs in
http://ci.openmicroscopy.org/view/Failing/job/BIOFORMATS-5.1-merge-build/352
Merge pull request #1 from melissalinkert/findbugs-fix

Specify encoding when working with strings