fix content-length computation for UTF-8 strings

fixes #44