removed $SESSION->encoding now replaced by current_charset() and $CFG->unicodedb...