/** * This method sets the default charset. The default charset is used, whenever * no charset is provided. * * Changing the default charset may have a high impact on the whole string * manipulation. Per default UTF-8 is set as the default charset. * * @param string | Customweb_Core_Charset $charset * @throws Exception * @return Customweb_Core_Charset */ public static function setDefaultCharset($charset) { if (is_string($charset)) { $charset = Customweb_Core_Charset::forName($charset); } else { if (!$charset instanceof Customweb_Core_Charset) { throw new Customweb_Core_Exception_CastException('Customweb_Core_Charset'); } } self::$defaultCharset = $charset; return self::$defaultCharset; }