Fixes for enconding issues

Added some fixes to some of the encoding issues that the plugin is currently riddled with.
More updates on this might be committed, since more test must be made.