/// <summary> /// Handles META tags that set page encoding /// </summary> /// <param name="oChunk">Chunk</param> void HandleMetaEncoding(HTMLparser oP, HTMLchunk oChunk, ref bool bEncodingSet) { // if encoding already set then we should not be trying to set new one // this is the logic that major browsers follow - the first Encoding is assumed to be // the correct one if (bEncodingSet) { return; } if (HTMLparser.HandleMetaEncoding(oP, oChunk, ref bEncodingSet)) { if (!bEncodingSet) { Console.WriteLine("Failed to set encoding from META: {0}", oChunk.GenerateHTML()); } } }
private void HandleMetaEncoding( HTMLparser oP, HTMLchunk oChunk, ref bool bEncodingSet ) { // if encoding already set then we should not be trying to set new one // this is the logic that major browsers follow - the first Encoding is assumed to be // the correct one if ( bEncodingSet ) return; if ( HTMLparser.HandleMetaEncoding( oP, oChunk, ref bEncodingSet ) ) { if ( !bEncodingSet ) Console.WriteLine( "Failed to set encoding from META: {0}", oChunk.GenerateHTML() ); } }