| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocument |
setCharset |
setCharset() |
Never | Work in Progress |
Sets the character set of the current document.
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’. |
Set the character set of the current document.
Example
global $mainframe; $document =& JFactory::getDocument(); $document->setCharset( 'utf-8' ); echo "Character Set: " . $document->getCharset();
Might produce:
Result
Character Set: utf-8