When the wchar_t specialization of basic_ofstream writes to the file, if the file is opened in text mode it will write a MBCS sequence. The internal representation will use a buffer of wchar_t characters.
The object stores an object of class basic_filebuf<Elem, Tr>.