fix osx encoding problem