private void formatCharTypes(Program program, Address addr, Scalar scalar,
			StringBuilder htmlText) {

		// The CharDataType can change depending on the DataOrg of the current program, so this
		// can't be a static array like INTEGER_DISPLAY_TYPES
		List<DataType> charDataTypes = Arrays.asList(new CharDataType(program.getDataTypeManager()),
			new WideChar16DataType(program.getDataTypeManager()),
			new WideChar32DataType(program.getDataTypeManager()));

		String prevCharVal = "";
		StringBuilder localHTMLText = new StringBuilder();

//		Endian progEndian = program.getMemory().isBigEndian() ? Endian.BIG : Endian.LITTLE;
		for (DataType charDt : charDataTypes) {
			// for each char data type, append its representation to the buffer, if it is
			// a new way to display the scalar
			ByteMemBufferImpl charMemBuffer =
				getScalarOperandAsMemBuffer(addr, scalar, charDt.getLength());
			prevCharVal =
				appendCharDataTypeFormattedHTML(prevCharVal, charDt, charMemBuffer, localHTMLText);
		}

		if (localHTMLText.length() > 0) {
			htmlText.append("<hr>");
			htmlText.append("<table width=\"100%\">") //
					.append(localHTMLText) //
					.append("</table>");
		}
	}
A hover service to show tool tip text for hovering over scalar values.
The tooltip shows the scalar in different bases.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractScalarOperandHover.java