dup the string for the tokenizer so the encoding of the original string is not affected