This is used to read in a file using an appropriate encoding method
Namespace: SandcastleBuilder.Utils.BuildEngineAssembly: SandcastleBuilder.Utils (in SandcastleBuilder.Utils.dll) Version: 1.9.7.0
Syntax
| C# |
|---|
public static string ReadWithEncoding( string filename, ref Encoding encoding ) |
| Visual Basic |
|---|
Public Shared Function ReadWithEncoding ( filename As String, ByRef encoding As Encoding ) As String |
Parameters
- filename
- Type: System..::..String
The file to load
- encoding
- Type: System.Text..::..Encoding%
Pass the default encoding to use. On return, it contains the actual encoding for the file.
Return Value
Type: StringThe contents of the file.
Remarks
When reading the file, use the default encoding specified
but detect the encoding if byte order marks are present. In
addition, if the template is an XML file and it contains an
encoding identifier in the XML tag, the file is read using
that encoding.