Notes
I love character encoding!
Tonight’s goal: Make a simple PHP class.
- Input: a URL pointing to an HTML document.
- Output: a UTF-8 version, regardless of what encoding it’s really in.
[…]
This is so useful, albeit to a relatively narrow range of programmers, that I feel bad not releasing it to the world, except that I assume that someone else has already done this and I just didn’t bother looking for it. (My experiences with PHP-community code are not good, so I almost always roll my own.) Any interest?
Yes, please release it. You don’t have to support it, but helping people convert into UTF-8 is a gift to mankind. I just wish we could convince more people to set everything up as UTF-8 by default. The vast majority of people don’t even know what character encoding is and release code that is an absolute nightmare to internationalize. If UTF-8 were standard, there would no such thing as “garbage characters”.
Posted: 2009-03-19 10:01