Modified merge with WordPress trunk r24121.

Removed changes to set_charset() since they're not currently applicable
to this build.