Added support for facet-based formatting. Implemented a locale-based character code conversion and deprecated the old one.