Microsoft KB Archive/306725

= BUG: The .NET configuration provider defaults to UTF-8 encoding when creating new configuration files =

Article ID: 306725

Article Last Modified on 1/25/2006

-

APPLIES TO


 * Microsoft Windows Management Instrumentation in . NET
 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.0
 * Microsoft .NET Framework Class Libraries 1.1
 * Microsoft .NET Framework Class Libraries 1.0
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition

-



This article was previously published under Q306725



SYMPTOMS
When you use the Windows Management Instrumentation (WMI) configuration provider to create a new configuration file, UTF-8 character encoding is used by default.



CAUSE
The WMI configuration provider does not provide control over the XML encoding that is used in a configuration file. It only uses preexisting encoding if this is already specified in the configuration file.



RESOLUTION
To work around this problem, you can add an encoding attribute to the header of the configuration file through other means (such as through an XML parser, a text editor, or direct file access). For example, you could start with a template configuration file that has the proper XML encoding header.

If you specify the encoding in a configuration file, the WMI configuration provider applies the encoding on both read and write operations. The provider also preserves the encoding information in the XML file.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: kbreadme

Keywords: kbtshoot kbbug kbnofix kbreadme kbvs2002sp1sweep kbvs2005swept kbvs2005doesnotapply KB306725

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.