Written string size used sometimes the wrong encoding. Fixes #31
Merge pull request #44 from Ghabry/development

Written string size used sometimes the wrong encoding. Fixes #31