static function ToHtml($string, HtmlQuoteMode $mode = null)
    {
        self::InitEncoding();
        if (!$mode)
            $mode = HtmlQuoteMode::DoubleQuotes();
                
        return htmlspecialchars($string, $mode->Flag(), self::GetEncoding()->Code());
    }