cleaned up handling of multibyte dosctrings