Consolidated charset conversion routines