4 ms·
There should be a new mime type for this: text/x-ansi
by jasonjayr 6y ago
There should be a new mime type for this: text/x-ansi
- gruez 6y agobut why "ansi"? ANSI is only an encoding. You can have html that's in ansi, and you can have something like OP's that's not in ansi (eg. if you add emojis).
- geofft 6y agoThis is "ANSI" as in ANSI X3.64 escape sequences, not "ANSI" as in a character encoding. You can output color to curl on an ANSI-compatible terminal but not to something expecting actual plain text like a browser.
- skissane 6y agoI think text/ecma48 would be a better name. There are lots of ANSI standards. (I guess text/ansi-x3.64 might also work, but text/ecma48 seems simpler.)
- jasonjayr 6y agoYes, I should have been more specific. text/x-term-${TERM} probably would be better, since it could be any number of terminal types...
- nitrogen 6y agoYou might be thinking of ASCII?
- gruez 6y agohttps://en.wikipedia.org/wiki/ANSI_character_set https://en.wikipedia.org/wiki/ANSI_character_set
- nitrogen 6y agoFrom the wiki: "The phrase ANSI character set has no well-defined meaning and has been used to refer to the following, among other things" So if you are thinking of CP-437 or Windows-1252 I suppose that's fair, but generally in the context of terminal apps "ANSI" without qualification refers to the escape sequences. Now I am curious though, did ANSI the standards body have any official character encoding standards?