Removed dead code.
Fixed issue 2: Generating string fails, if the string contains unicode
characters.