/// <summary> /// Sets the document's encoding to the given one. /// </summary> /// <param name="encoding">The encoding to use.</param> void SetEncoding(String encoding) { if (DocumentEncoding.IsSupported(encoding)) { var enc = DocumentEncoding.Resolve(encoding); if (enc != null) { doc.InputEncoding = enc.WebName; tokenizer.Stream.Encoding = enc; } } }
/// <summary> /// Sets the document's encoding to the given one. /// </summary> /// <param name="source">The source to change.</param> /// <param name="encoding">The encoding to use.</param> static void SetEncoding(SourceManager source, String encoding) { //TODO return; if (DocumentEncoding.IsSupported(encoding)) { var enc = DocumentEncoding.Resolve(encoding); if (enc != null) { source.Encoding = enc; } } }