<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scrub(self):
 """ The XML file seems to have mixed-encoding; we scrub out the control characters from the file for processing. i.e.?i omia.xml:1555328.28: PCDATA invalid Char value 2 <field name="journal">Bulletin et Memoires de la Societe Centrale de Medic :return: """


        LOG.info("Scrubbing out the nasty characters that break our parser.")

        myfile = '/'.join((self.rawdir, self.files['data']['file']))
        tmpfile = '/'.join((self.rawdir, self.files['data']['file']+'.tmp.gz'))
        tmp = gzip.open(tmpfile, 'wb')
        du = DipperUtil()
        with gzip.open(myfile, 'rb') as fh:
            filereader = io.TextIOWrapper(fh, newline="")
            for line in filereader:
                line = du.remove_control_characters(line) + '\n'
                tmp.write(line.encode('utf-8'))
        tmp.close()
        # TEC I do not like this at all. original data must be preserved as is.
        # also may be heavy handed as chars which do not break the parser
        # are stripped as well (i.e. tabs and newlines)
        # move the temp file
        LOG.info("Replacing the original data with the scrubbed file.")
        shutil.move(tmpfile, myfile)
        return