Feature/encoding for non utf8 chars

Update encoder to deal with different inputs.
Force usage of iconv for not utf-8 strings.
Also update travis to include ruby 1.8.7