UTF-8 encoding bugfix

Here is a fix about UTF8 encoding (wrong size inserted in chars instead of bytes).
~~I also cleaned a bit the structure and updated the gemspec to new convetions.~~