add encoding flag to fix ruby 1.9