address magic encoding issues with ruby 1.9.3

re:

http://stackoverflow.com/a/8943483/511710