added string splitting to convert charset