what characters does this fix? and do we have to worry about unicode in this line or are we sure that `val` will be a unicode string already unless it's something like a number?