'Find what group character is a part of.'

def code_group(self, character):

    try:
        return ('x%02x' % (ord(unicode(character)) >> 8))
    except:
        return ('x%02x' % (ord(character) >> 8))
