def insert_string(self, data):
        """insert_string(data)

        Insert the resources entries in the string DATA into the
        database.

        """

        # First split string into lines
        lines = data.split('\n')

        while lines:
            line = lines[0]
            del lines[0]

            # Skip empty line
            if not line:
                continue

            # Skip comments
            if comment_re.match(line):
                continue

            # Handle continued lines
            while line[-1] == '\\':
                if lines:
                    line = line[:-1] + lines[0]
                    del lines[0]
                else:
                    line = line[:-1]
                    break

            # Split line into resource and value
            m = resource_spec_re.match(line)

            # Bad line, just ignore it silently
            if not m:
                continue

            res, value = m.group(1, 2)

            # Convert all escape sequences in value
            splits = value_escape_re.split(value)

            for i in range(1, len(splits), 2):
                s = splits[i]
                if len(s) == 3:
                    splits[i] = chr(int(s, 8))
                elif s == 'n':
                    splits[i] = '\n'

            # strip the last value part to get rid of any
            # unescaped blanks
            splits[-1] = splits[-1].rstrip()

            value = ''.join(splits)

            self.insert(res, value)
insert_string(data)

        Insert the resources entries in the string DATA into the
        database.