fix spec. Add String#encoding method for 1.8.x