by Michael S. Kaplan, published on 2006/04/18 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/04/18/577922.aspx
Having to deal with the double standard symbolized by the "Do what I say (not what I do!)" that some parents find themselves having to enforce seems almost like a part of life.
Earlier today I got to see us handling it in the converse sense....
Here is what the customer reported:
We have .resx files that contains error message strings in different languages. These are used to generate satellite assemblies when we compile. When we first created them, we had a problem with some German characters not appearing properly because of either ANSI or UTF8 encoding used to save the .resx file. In order to get by this problem, we had to go through each German .resx file and save it with Unicode encoding. Once this was done, this all worked fine with Visual Studio 2003.
Now that I'm converting to Visual Studio 2005, I got a compiler error because the encoding attribute on the XML header was set to UTF8 but the file was saved as Unicode. All I did to get by the problem is remove the encoding attribute from the XML header and it recompiled successfully.
Now what better example of "Do what I do (not what I say)" could be found than in a problem caused by what was apparently happening in 1.1 of the .NET Framework -- where we were doing what the BOM/encoding DID rather than what the XML header SAID?
This is obviously not the most defensible strategy when it is stated in such a way -- and frankly, what is the meaning of the situation when the encoding attribute and the actual encoding are not the same? Isn't that just wrong?
Perhaps, as most parents realize (when the found that children would simply not abide such a state of affairs!) it is best to make sure that What we do and What we say are the same thing....
This post is sponsored by "" U+feff (ZERO WIDTH NO-BREAK SPACE, of course)
# Mihai on 18 Apr 2006 1:50 PM:
# Maurits [MSFT] on 18 Apr 2006 5:42 PM: