Factored out the string encoding to allow for the choosing of a string encoding other than the one forced upon.