def get_charset_info(charset):

  ranges = coverage.convert_set_to_ranges(charset)
  prev = -1
  range_list = []
  for start, end in ranges:
    range_len = start - 1 - prev
    if range_len > 0:
      range_list.append('%x' % range_len)
    else:
      range_list.append('')
    range_len = end - start
    if range_len > 0:
      range_list.append('%x' % range_len)
    else:
      range_list.append('')
    prev = end + 1
  return ','.join(range_list)
Returns an encoding of the charset as pairs of lengths of runs of chars
dataset/ETHPy150Open googlei18n/nototools/nototools/generate_website_2_data.py/get_charset_info