====== setCharset ====== {#JAPI Joomla.Framework Document JDocument::setCharset #} Sets the character set of the current document. ===== Syntax ===== void setCharset ( **$type** ) | **$type** | string | is a string containing the new character set identifier. This parameter is optional and if omitted defaults to 'utf-8'. | ===== Examples ===== Set the character set of the current document. global $mainframe; $document =& JFactory::getDocument(); $document->setCharset( 'utf-8' ); echo "Character Set: " . $document->getCharset(); Might produce: Character Set: utf-8