The things they don't prepare you for in school... I was working at my first job and we had a ColdFusion app that was displaying some data from the database. I get a ticket one day saying our search page would crash when searching for a very specific document. The other 1 million+ documents all loaded fine to our knowledge, so why this one? I was pretty junior back then and feeling mighty defeated as to why I couldn'…
Inspect ANSI control codes and escape sequences
31–40 of 52 posts
Re: Inspect ANSI control codes and escape sequences
#32The things they don't prepare you for in school... I was working at my first job and we had a ColdFusion app that was displaying some data from the database. I get a ticket one day saying our search page would crash when searching for a very specific document. The other 1 million+ documents all loaded fine to our knowledge, so why this one? I was pretty junior back then and feeling mighty defeated as to why I couldn'…
There are also zero-space width characters, yeah utf is a rabbit hole
The tool currently counts any unicode character as a single-width one.
Re: Inspect ANSI control codes and escape sequences
#33"\u001b[0m — reset" ... what? Why SGR is not called by name, while, e.g. CUU is? strange... According to which terminal or standard it interperts sequences? Is this tool really helpful? It does look nice! But it does not help with the corneriest cases that would benefit from such tool the most.
Got to start somewhere! Didn't see many examples to get inspired by either. Here's the full table: https://ansi.tools/lookup . This is my initial take on it. Please bring in the corneriest cases! It's open source so bug reports, RFCs and pull requests are most welcome.
I am sure capturing it's output will provide endless source of amusement and despair.
There are sequences from real terminal (e.g. stuff documented at vt100.net), sequences from ECMA 48 and friends (most of it likely never implemented), and de-facto behaviour of different software. Infamous examples being original windows terminal, rxvt (ugh), linux co nsole, emacs terminal.
Most vexing behaviour is background fill on newline, incorrect characters in terminal reports, broken scroll region, inability to write in bottom-right position etc.
This project looks fun! But it leads to endless narrow abandoned places. Hopefully you will enjoy the experience!
Re: Inspect ANSI control codes and escape sequences
#34"\u001b[0m — reset" ... what? Why SGR is not called by name, while, e.g. CUU is? strange... According to which terminal or standard it interperts sequences? Is this tool really helpful? It does look nice! But it does not help with the corneriest cases that would benefit from such tool the most.
Got to start somewhere! Didn't see many examples to get inspired by either. Here's the full table: https://ansi.tools/lookup . This is my initial take on it. Please bring in the corneriest cases! It's open source so bug reports, RFCs and pull requests are most welcome.
Re: Inspect ANSI control codes and escape sequences
#35The things they don't prepare you for in school... I was working at my first job and we had a ColdFusion app that was displaying some data from the database. I get a ticket one day saying our search page would crash when searching for a very specific document. The other 1 million+ documents all loaded fine to our knowledge, so why this one? I was pretty junior back then and feeling mighty defeated as to why I couldn'…
Pasted it into a hex editor, tracked down the bytes, and while I can't currently remember specifically what the encoding problem was, it was something to do with going between UTF-8 > ISO-8859 > UTF-8 again.
I've since aliased `pbpaste | xxd` (macOS, linux has similar CLI tools for working with the clipboard depending on your distro/DE), because weird shit like this comes up more often than I'd care to admit. Last rabbit hole was discovering that in macOS 15, Apple changed one of the the "space" characters in the default Screenshot file names, but only if your Mac is set to use 12-hour time from a normal ASCII 0x20 space, to a Unicode 'U+202F NNBSP' "non-breaking space" between the time and AM/PM, which was causing S3 uploads to fail.
Re: Inspect ANSI control codes and escape sequences
#36Re: Inspect ANSI control codes and escape sequences
#37I was a teenager when BBS's were popular. I still sometimes think I would enjoy writing an ANSI parser.
Re: Inspect ANSI control codes and escape sequences
#38The things they don't prepare you for in school... I was working at my first job and we had a ColdFusion app that was displaying some data from the database. I get a ticket one day saying our search page would crash when searching for a very specific document. The other 1 million+ documents all loaded fine to our knowledge, so why this one? I was pretty junior back then and feeling mighty defeated as to why I couldn'…
Re: Inspect ANSI control codes and escape sequences
#39This is a fantastic web util; bookmarked for the future. I wish I had this when I was making, [Dragon's Oven]( https://tronster.itch.io/dragon ). It was a lot of nights and weekends of tinkering with ANSI codes in Typescript. I learned a lot that surprised me, such as: most modern OS's still don't support 16m colors out of the box and that the default Linux shell doesn't support beyond 16 colors. Also no really good…
TheDraw was a cornerstone of my teenage years. I would log into different BBSs just to see their ANSI welcome screens, then I would try and re-create them to learn the art. It was a unique form of animation and I was hoping you had figured out how to get TheDraw working. I also later used ANSI to make my own cool command line prompts in DOS and later, Linux.
Re: Inspect ANSI control codes and escape sequences
#40The revealing shibboleth is when people call it "ANSI". (-: "ANSI" is what people call it when they are working from paltry and incomplete samizdat doco of how this stuff works, from Microsoft's old ANSI.SYS appendix to its MS-DOS user manual, to innumerable modern WWW sites all repeating received wisdom. The thing to remember is that the "E" in "ECMA" does not stand for "ANSI". * https://ecma-international.org/publi…
We just knew that at some point in time, all the Hazeltine terminals were going to end up in the garbage, which is what they deserved, and no one would rescue them.
https://www.shallowsky.com/linux/noaltscreen.html
The parent post is SOLID GOLD.