I think that, while this had been done before, it's usually packaged in hugely ponderous libraries (such as libiconv). I may make use of this in a data file parser I'm writing right now.
I've got good news, and I've got bad news: The universe is merely a figment of my imagination. Now are you ready for the bad news?
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?