Looks like this is supposed to operate on native strings so there's no need to encode or decode at all here Fixes #30354