[#BloombergLP-balxml-TypesPrintUtil-printText] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/TypesPrintUtil.adoc[TypesPrintUtil]::printText :relfileprefix: ../../../ :mrdocs: Format the specified `object` to the specified output `stream` using the `bdlat_FormattingMode::e_TEXT` formatting mode and the optionally specified `encoderOptions`. Return a reference to `stream`. The string representation of `object` must be a valid UTF‐8 string and may not contain any control characters other than TAB, NL, and CR (i.e., no binary data) unless `encoderOptions‐>allowControlCharacters()` is `true`, in which control characters will be encoded as is. Upon detecting an invalid byte, the output stops and the `failbit` is be set on the output `stream`. In the case of an invalid byte in a multi‐byte character, the output stops after the previous character and no byte in this character is output. == Synopsis Declared in `<balxml_typesprintutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> static std::ostream& printText( std::ostream& stream, TYPE const& object, xref:BloombergLP/balxml/EncoderOptions.adoc[EncoderOptions] const* encoderOptions = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#