remove trailing \0 handling

dataUsingEncoding doesn't add trailing \0