private void ensureTextMode() {
		if (sb.length() == 0) {
			sb.append(quoteChar);
		}
		else if (byteMode) {
			sb.append(',');
			sb.append(quoteChar);
		}
		byteMode = false;
	}
Adds the characters found in the supplied {@link ByteBuffer} to the result.
<p>
Any portions of the byte buffer that cause problems for the charset codec will be added
as a {@link #addByteSeq(ByteBuffer, int) byte sequence}.
<p>
Characters that are outside the traditional ASCII range will be rendered as-is or as
escape sequences, depending on the RENDER_ENUM setting.
 
@param bb {@link ByteBuffer} containing bytes of a string
@param renderSetting {@link RENDER_ENUM}
@param trimTrailingNulls boolean flag, if true trailing null bytes will not be included
in the rendered output
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StringRenderBuilder.java