C# UTF8Encoding IsBrowserDisplay

Description

UTF8Encoding IsBrowserDisplay When overridden in a derived class, gets a value indicating whether the current encoding can be used by browser clients for displaying content.

Syntax

UTF8Encoding.IsBrowserDisplay has the following syntax.


public virtual bool IsBrowserDisplay { get; }

Example

The following example checks the values of the Boolean properties of each encoding.


// ww w  . j  a  v a 2 s. c  o  m
using System;
using System.Text;

public class SamplesEncoding  {

   public static void Main()  {
      foreach( EncodingInfo ei in Encoding.GetEncodings() )  {
         Encoding e = ei.GetEncoding();
         Console.Write( "{0,-6} {1,-25} ", ei.CodePage, ei.Name );
         Console.Write( "{0,-8} {1,-8} ", e.IsBrowserDisplay, e.IsBrowserSave );
         Console.Write( "{0,-8} {1,-8} ", e.IsMailNewsDisplay, e.IsMailNewsSave );
         Console.WriteLine( "{0,-8} {1,-8} ", e.IsSingleByte, e.IsReadOnly );
      }

   }

}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding