def encoding_chars(self):
        """
        A ``dict`` with the encoding chars of the :class:`Element <hl7apy.core.Element>`.
        If the :class:`Element <hl7apy.core.Element>` has a parent it is the parent's
        ``encoding_chars`` otherwise the ones returned by
        :func:`get_default_encoding_chars <hl7apy.get_default_encoding_chars>`
        The structure of the ``dict`` is:

        .. code-block:: python

            {'SEGMENT' : '\\r',
            'GROUP': '\\r',
            'FIELD' : '|',
            'COMPONENT' : '^',
            'SUBCOMPONENT' : '&',
            'REPETITION' : '~',
            'ESCAPE' : '\\'}

        """
        if self.parent is not None:
            return self.parent.encoding_chars
        return get_default_encoding_chars(self.version)