Bug in Markdown character conversion


#1

The Markdown to HTML conversion also forgets to convert accents, greek letters, etc.

For example, µ or é look fine in .md, markdown preview and .html when opened in Atom. However, browsers read them as µ and é as they haven’t been converted to the corresponding HTML entities: μ and é in this case.


Markdown preview: HTML insert
#2

Sounds more like the wrong charset specified in your HTML.

<!doctype html>
µ or é

Results in µ or é in a browser, but:

<!doctype html>
<meta charset="utf-8">
µ or é

Results in µ or é.


#3

I entered the following Markdown in Atom v0.139.0-5c417cf:

# Test

* &mu; &mdash; μ
* &eacute; &mdash; é

It generated the following HTML in the Markdown Preview:

<h1 id="test">Test</h1>
<ul>
<li>μ — μ</li>
<li>é — é</li>
</ul>

I used the Save As HTML feature and saved it to a file. I opened it in a hex viewer and saw what I expected, since it was saved as UTF-8 encoding, the μ and é characters were two bytes each. But when I opened the same file in Chrome:

I assume that your default encoding in your browser is something other than UTF-8.


#4

Ah yes, that solved it: all of mine had Western (ISO-8859-1) by default.

Thank you!


#5

Since this was resolved, I’m going to autoclose the topic in 24 hours unless something else comes up.


#6

This topic was automatically closed after 24 hours. New replies are no longer allowed.