Character encoding auto-detection in Ruby. As smart as your browser. Open source.