How to handle special characters in markdown?

clstaudt picture clstaudt · Oct 5, 2012 · Viewed 15.7k times · Source

I am just discovering Markdown and MultiMarkdown and I am loving it so far. However, special characters are not properly escaped when exporting to HTML and come out as garbage in the browser.

Example:

How does Markdown handle special characters?
============================================

For example, German is full of ä, ö, ü and ß.

is converted to

<h1 id="howdoesmarkdownhandlespecialcharacters">How does Markdown handle special characters?</h1>

<p>For example, German is full of ä, ö, ü and ß.</p>

Since I have to write in German a lot, entering the escape sequences by hand is not an option. How can I get HTML output with properly escaped special characters?

Answer

JustAnotherCoder picture JustAnotherCoder · Apr 28, 2014

I do not know if this scenario apply to you, but here goes:

I have the same need regarding the Norwegian letters 'æ', 'ø' and 'å'. I use FireFox and the add-on 'Markdown Viewer' to view markdown documents.

Viewing a Norwegian document in Markdown Viewer will render garbled letters if the document is saved in the ordinary manner.

Saving the document using western (windows 1252) encoding renders the text just fine (I also tried with your German letters).