def octets(options, cc):
    """Format each byte of the encoded character."""

    utf8_bytes = cc.encode(options.encoding)
    octets = []
    for utf8_byte in utf8_bytes:
        byte_in_hex = "0x%02X" % utf8_byte
        octets.append(byte_in_hex)
    return " ".join(octets)