Make load_charset more flexible