def charset_to_encoding(name):
 if (name == 'utf8mb4'):
  return 'utf8'
 return name

def charset_to_encoding ( name ) : if ( name == 'utf8mb4' ) : return 'utf8' return name
convert mysqls charset name to pythons codec name .