'Set active ``G0`` or ``G1`` charset.
:param str code: character set code, should be a character
from ``"B0UK"`` -- otherwise ignored.
:param str mode: if ``"("`` ``G0`` charset is set, if
``")"`` -- we operate on ``G1``.
.. warning:: User-defined charsets are currently not supported.'

def set_charset(self, code, mode):

    if (code in cs.MAPS):
        setattr(self, {u'(': u'g0_charset', u')': u'g1_charset'}[mode], cs.MAPS[code])
