Skip to content

Comment on Write Plain Text Files (2022)parent

Comments

It's relatively easy to get the document format by using a heuristic on "not so plain" text, not to be talking about more "binary" formats which are even easier to recognise, for example to differentiate between Markdown and Org-Mode and RST, or the different Markdown variants. It is (almost) impossible to get the encoding (welcome to ISO 8859-? vs. Windows-????) or even the used codepage right.

Take at look at the "reality": there are converters for almost any file format and file format descriptions for (almost any imaginable), so there is a chance to read or write almost any format by yourself (yes, some can be really complex, as for example some 3D formats like 3DS or LWO).

I don't mean to say that somebody shouldn't use "plain text" for themselves, but that the idea of "this is plain text, this works everywhere and anytime" is not true.

And the list of known codepages (and I can guarantee you there is some hardware - a printer - out there that uses it's own, because it had been only ever used with it's own printer driver/program/...): https://en.wikipedia.org/wiki/Code_page

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.