The current implementation of String parsing uses internal functionality that makes trying to do something similar for other encodings difficult. Maybe the internal API could be made public, or more generic String parsing could be implemented that allows passing in an encoding.