# Buggy code
def _ParseContainerTable(
    self,
    parser_context,
    file_entry=None,
    parser_chain=None,
    table=None,
    container_name="Unknown",
):
    """Parses a Container_# table.

    Args:
      parser_context: A parser context object (instance of ParserContext).
      file_entry: Optional file entry object (instance of dfvfs.FileEntry).
      parser_chain: Optional string containing the parsing chain up to this
                    point.
      table: Optional table object (instance of pyesedb.table).
      container_name: Optional string that contains the container name.
                      The container name indicates the table type.
                      The default is a string containing 'Unknown'.
    """
    if table is None:
        logging.warning("[{0:s}] invalid Container_# table".format(self.NAME))
        return

    for esedb_record in table.records:
        # TODO: add support for:
        # wpnidm, iecompat, iecompatua, DNTException, DOMStore
        if container_name == "Content":
            value_mappings = self._CONTAINER_TABLE_VALUE_MAPPINGS
        else:
            value_mappings = None

        record_values = self._GetRecordValues(
            table.name, esedb_record, value_mappings=value_mappings
        )

        if container_name in [
            "Content",
            "Cookies",
            "History",
            "iedownload",
        ] or container_name.startswith("MSHist"):
            timestamp = record_values.get("SyncTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, "Synchronization time", record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("CreationTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.CREATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("ExpiryTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.EXPIRATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("ModifiedTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.MODIFICATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("AccessedTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.ACCESS_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("PostCheckTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, "Post check time", record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )


# Traceback (UnicodeDecodeError)
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/plaso/engine/worker.py", line 123, in _ParseFileEntryWithParser
parser_object.Parse(self._parser_context, file_entry)
File "build/bdist.linux-x86_64/egg/plaso/parsers/winprefetch.py", line 407, in Parse
filename_strings = self._ParseFilenameStrings(file_object, file_information)
File "build/bdist.linux-x86_64/egg/plaso/parsers/winprefetch.py", line 305, in  _ParseFilenameStrings
filename_strings_data)
File "build/bdist.linux-x86_64/egg/plaso/lib/binary.py", line 243, in   ArrayOfUt16StreamCopyToStringTable
'utf-16-le')
File "/usr/lib/python2.7/encodings/utf_16_le.py", line 16, in decode
return codecs.utf_16_le_decode(input, errors, True)
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 100-101: illegal encoding

# Fixed code
def _ParseContainerTable(
    self,
    parser_context,
    file_entry=None,
    parser_chain=None,
    table=None,
    container_name="Unknown",
):
    """Parses a Container_# table.

    Args:
      parser_context: A parser context object (instance of ParserContext).
      file_entry: Optional file entry object (instance of dfvfs.FileEntry).
      parser_chain: Optional string containing the parsing chain up to this
                    point.
      table: Optional table object (instance of pyesedb.table).
      container_name: Optional string that contains the container name.
                      The container name indicates the table type.
                      The default is a string containing 'Unknown'.
    """
    if table is None:
        logging.warning("[{0:s}] invalid Container_# table".format(self.NAME))
        return

    for esedb_record in table.records:
        # TODO: add support for:
        # wpnidm, iecompat, iecompatua, DNTException, DOMStore
        if container_name == "Content":
            value_mappings = self._CONTAINER_TABLE_VALUE_MAPPINGS
        else:
            value_mappings = None

        try:
            record_values = self._GetRecordValues(
                table.name, esedb_record, value_mappings=value_mappings
            )
        except UnicodeDecodeError as exception:
            logging.error(
                (
                    "[{0:s}] Unable to return record values for {1:s} with error: {2:s}"
                ).format(
                    parser_chain,
                    file_entry.path_spec.comparable.replace("\n", ";"),
                    exception,
                )
            )
            continue

        if container_name in [
            "Content",
            "Cookies",
            "History",
            "iedownload",
        ] or container_name.startswith("MSHist"):
            timestamp = record_values.get("SyncTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, "Synchronization time", record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("CreationTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.CREATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("ExpiryTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.EXPIRATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("ModifiedTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.MODIFICATION_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("AccessedTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, eventdata.EventTimestamp.ACCESS_TIME, record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )

            timestamp = record_values.get("PostCheckTime", 0)
            if timestamp:
                event_object = MsieWebCacheContainerEventObject(
                    timestamp, "Post check time", record_values
                )
                parser_context.ProduceEvent(
                    event_object, parser_chain=parser_chain, file_entry=file_entry
                )