Exemplo n.º 1
0
 /**
  * Will convert the input strings special chars (all above 127) to entities.
  * The string is expected to be encoded in the charset, $this->charSet
  * This function is used to create strings that can be used in the Click Menu
  * (Context Sensitive Menus). The reason is that the values that are dynamically
  * written into the <div> layer is decoded as iso-8859-1 no matter what charset
  * is used in the document otherwise (only MSIE, Mozilla is OK).
  * So by converting we by-pass this problem.
  *
  * @param	string		Input string
  * @return	string		Output string
  * @access	public
  */
 public function makeEntities($str)
 {
     // Convert string to UTF-8:
     if ($this->charSet != 'utf-8') {
         $str = $this->csConvObj->utf8_encode($str, $this->charSet);
     }
     // Convert string back again, but using the full entity conversion:
     return $this->csConvObj->utf8_to_entities($str);
 }