On 3/31/2017 2:04 PM, Shal Farley wrote:
Warren wrote:
> Someone brought up TECO. I don’t expect anyone’s TECO implementation
> to handle UTF-8,

That was me...

Hmm... I was going to say in jest that the DECUS swap tapes have a version written in C, were anyone nuts enough to take a crack at it. However Google reveals that it is closer at hand than I thought - someone has already ported it to Windows, Mac and Linux:
https://github.com/blakemcbride/TECOC

Since I am just nuts enough and already have Git, Visual Studio, and past exposure to TECO thanks to Shal and others, I checked it out and built it on Windows 10, 64-bit. I could certainly have built it for 32-bit, but when overdoing something, there's no point in holding back.

So I accidentally wrote a blog post about the experiment.

https://curiouser.cheshireeng.com/2017/04/01/ancient-tools-the-teco-editor-vs-utf-8-text/

The takeaway is that, surprisingly, a 54 year old ASCII based text editor actually can edit a Unicode document stored in UTF-8. But it is not very good at it.

As someone who once wrote ad-hoc utilities as TECO macros, all I can say is: No.

There are languages that would be less pleasant to use for transforming text. TECO at least was designed for the purpose. And aside from a few control characters it is almost entirely oblivious to the character set in use. Since UTF-8 was designed to leave 7-bit ASCII intact, TECO will "work" on UTF-8 text with a couple of constraints.

But I won't recommend you try it at home.

--
Ross Berteig                               [email protected]
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to