MDL-6196 infinite loop in header encoding when using some site charsets (gb18030); merged from MOODLE_18_STABLE
MDL-6196 infinite loop in header encoding when using some site charsets (gb18030); merged from MOODLE_18_STABLE

dilawar/moodle