Tested it on #Windows now. Ok, it works on some Windows-10 machine, the terminal nowadays can do both #utf8 output and interpret some #ansi sequences ...
Just released dos2ansi v0.4, with lots of #DOS#codepage s supported and a testmode to display them.
The next nice feature would be to use the actual terminal capabilities if output goes there. Very simple on *nix-like systems (#Linux, #FreeBSD, ...), just link #curses and use the termcap functions.
Thinking about #Windows again, either I keep relying on #UTF8 support (since #win7 IIRC? and still a bit buggy) and #ANSI sequences support (since #win10) .... OR I attempt to use the native #Console#API there (using special functions to write in #UTF16 and other special functions to set colors, which would require a major refactoring first 🙄)
Released v0.6.1 just fixing one stupid little regression from refactoring: The terminfo writer must never be used when output does not go to stdout 🙈
So far so good, I just thought there was yet another bug, testing redirected output on #Windows. I always got a file encoded as #UTF16LE, no matter which format I chose (and with #UTF8 chosen, the output was just broken). Meditated on the code for a while. Looks all perfectly good.
Finally, I tested in good old #CMD. And it worked perfectly well.
So, #Powershell is messing with the encoding of my stdout stream on redirects. Really? Really??? WTF, #Microsoft? How should that ever do any good? 🤯
My #Ansible playbook failed because an otherwise legitimate variable input broke the lineinfile regex parser and I couldn't report about it in the PR review, since it broke some kind of validation for issue comments in #Forgejo. #regex is hilarious.
Years ago I was pushed out of a job because management was upset with me. I pointed out that what they were doing wasn't scalable.
A few years later, with new management, they retained me as a consultant for two years fixing some of the problems I told them about. I was paid considerably more money and they lost many developers in the interim.
Have you ever been doubted at work? What happened?
@ovid Few years ago I had a potential long-term #Perl client. We made a first small contract. In their #CGI hell I found they had #UTF8 in their database and told browsers to do so but both I/O were not configured. It seemed to work but internally all their strings were garbage. Nobody understood. Some string operations were done in #SQL because there it "magically" worked.
I tried to explain but they didn't understand or even believed me there was any issue at all. I do not miss that client.
An Exhaustive Test Program for the Legendary Höhrmann UTF-8 Decoder
“The Höhrmann Decoder, implemented as a deterministic finite state machine, needs only a handful lines of C code and 364 bytes for a combined character class and state transition table.
[...]
hoehrmann-utf8-test.c exhaustively tests all possible inputs to the decoder, that makes 269492416 different byte sequences[^1], out of which 1112063[^2] are accepted.”
I’m taking you back in time today to February 2005, when we had a batch of hundreds of shirts printed for the @w3c annual conference, where all the people who develop standards for the web met face to face.
The printer couldn’t read the ®️ sign on the design files and we ended up with #wtf8 instead of #utf8 😳 #oops
I just received some #email gore: a text/html email in greek auto-converted to a text/plain alternative is actually almost every greek character as an html escape code, sample:
You might've heard of ASCII or UTF-8. These character encodings built by very smart people.
I just built “UTF-21”, an impractical alternative that only a fool would use. Read about it (with a short Unicode crash course) here: https://evanhahn.com/utf-21/