I've written a Norwegian markdown document:
$ file brukerveiledning.md brukerveiledning.md: UTF-8 Unicode text
I've converted it to HTML using the
$ markdown > brukerveiledning.html < brukerveiledning.md $ file brukerveiledning.html brukerveiledning.html: UTF-8 Unicode text
However, Firefox insists on using the "windows-1252" encoding, breaking the non-ASCII characters. I've tried setting the changing the fallback text encoding from "Default for Current Locale" (which here in the UK should be either ISO-8859-1 or UTF-8) to "Central European, ISO", "Central European, Microsoft", and "Other (incl. Western European)". None of these can display æ, ø and å. There are no Unicode options. I've also tried changing
intl.fallbackCharsetList.ISO-8859-1 in about:config to various values like
iso-8859-1, with no luck.
$ pacman --query --owns "$(which markdown)" /usr/bin/markdown is owned by markdown 1.0.1-6
and this locale:
$ locale LANG=en_GB.utf8 LC_CTYPE="en_GB.utf8" LC_NUMERIC="en_GB.utf8" LC_TIME="en_GB.utf8" LC_COLLATE="en_GB.utf8" LC_MONETARY="en_GB.utf8" LC_MESSAGES="en_GB.utf8" LC_PAPER="en_GB.utf8" LC_NAME="en_GB.utf8" LC_ADDRESS="en_GB.utf8" LC_TELEPHONE="en_GB.utf8" LC_MEASUREMENT="en_GB.utf8" LC_IDENTIFICATION="en_GB.utf8" LC_ALL=
I tried to ask for a solution at the
markdown command level, but that was rejected.
åæâéèand opened it in firefox. The output was garbage:
Ã¥Ã¦Ã¢Ã©Ã¨. However, if I add
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />to the top, it outputs properly. Not sure how you would do this for a .md file.