Detab should be multi-byte aware?

Allan Odgaard 29mtuz102 at sneakemail.com
Mon Oct 9 19:47:23 EDT 2006


On 10. Oct 2006, at 00:19, John Gruber wrote:


> [...] If Markdown.pl ever gains explicit support for text

> encodings, the

> rules will be simple: UTF-8 in, UTF-8 out, no exceptions.


Or you could check the users locale (LC_CTYPE). Though hardcoding it
to UTF-8 works for me.

You can also verify that it is valid UTF-8 first, the probability of
a non-UTF-8 file validating as UTF-8 is so small that for all
practical matters it does not happen.


> [...] I don't think the rules for the syntax (as opposed to the

> implementation) need to mention it, though, at least not yet.


Well, if it is not explicitly mentioned, then you repeat the mistake
of HTML not specifying the tab size, and thus making the use of tabs
unreliable ;)






More information about the Markdown-Discuss mailing list