예제 #1
0
        /// <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;
                }
            }
        }
예제 #2
0
        /// <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;
                }
            }
        }