The newer Swift native method is broadly supported and can properly
handle complex UTF-8 characters like emoji, whereas the old API does
not work correctly with emoji.
In most cases, this likely wouldn't have caused any issues but it does
make things a little cleaner now, and ensures we won't encounter emoji
trouble in the future.