Factored out the string encoding 

Allow for the choosing of a string encoding other than the one forced upon.