Now that we have a cross-platform UTF-8 decoder in WTF, it may make sense to use it in WebCore, too. Use <http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt> to test its behavior on edge cases.
As this code moved around a couple times I'm going to assume this can be closed.