Updated for charset conversion