Refactored convert utility to use the global configuration instead of a hard-coded default charset.