A couple of times, I have encountered an issue with Windows Live Writer related to the handling of special characters like in Crème Brûlée.
The issue was that in WLW everything appears fine, but when posted to the blog, it displayed as Crème Brûlée.
The only way I could get the text to display properly was to enter the special characters as HTML entities like this:
Crème Brûlée
I should note that in the above initial example, I did not enter the characters directly into WLW, but instead copied them from a web page then pasted them into the WLW editor.
I posted an item on the Windows Live Writer MSN Group and got a very quick response.
The net of the solution was:
Ah, here's the problem. The encoding is simply declared incorrectly in your blog template. If you change this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
to this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
everything will work fine. You can confirm this by forcing your browser to display your homepage in UTF-8 (in IE7, right-click on the page and select Encoding | UTF-8; in Firefox, it's on the View menu).
Here is a sample of Crème Brûlée that was copied from another page and pasted into WLW so you can see the difference between the display with iso-8859-1 and UTF-8 encodings (you'll have to force the display as noted in the solution above).
So, one option is to edit each of the master templates in Movable Type to use the charset-utf-8 directive and then rebuild the site. Since I don't use special characters that often, I am going to hold off on doing that since I am concerned that the change might break something else.
The other option is just to convert the special characters manually to HTML entities. Of course, to do this, one would need a list of the characters and their corresponding Entity Names. Fortunately, there are many pages out there with this information concisely captured and nicely formatted including:
http://www.w3schools.com/tags/ref_entities.asp
and
http://www.cookwood.com/html/extras/entities.html
just for starters. For a longer list, Google HTML Entities.
Unfortunately, there is what I consider to be a bug in WLW. If I enter the HTML entities into WLW in the HTML Code View, then switch to any of the other views, when I switch back to the HTML Code View, the HTML entities are converted into their character equivalents, effectively overriding the HTML code that was entered. The only way I have identified to work around this is to not switch back to a WYSIWYG view prior to publishing. Of course, if you have want to edit the entry at a later date, you will have to remember to switch to the HTML Code View prior to opening the entry, or the HTML will get munged.
Digg It!
Bookmark it!