Character set detection.