fixed ruby 1.9 encode error.