implementing codecs for DBCS