top | item 38764012

(no title)

nox100 | 2 years ago

[flagged]

discuss

order

stevekemp|2 years ago

Like many I appreciated seeing Antirez's kilo project, and went my own direction with a trivial fork: adding support for an embedded lua scripting language, allowing multiple buffers, and flexible syntax highlighting for different languages, etc.

For me one of the challenges was getting UTF8 support, since I live in Finland and am exposed to ä, ö, and other characters. It was a fun learning experience, even though I never intended it to become a "real editor" and I continue to use emacs on a daily basis.

Quickly looking over the (closed) bug reports I see the discussion I had with myself back in 2016 which largely caused me to rewrite the core in C++ so I could take advantage of modern facilities to make UTF8 work more easily:

https://github.com/skx/kilua/issues/49

pharrington|2 years ago

I think you're reading intent that isn't there with this project. The author states its a WIP, and is writing it as a learning experience for building text interfaces without ncurses.

The_Colonel|2 years ago

The lack of non-ASCII support is not mentioned on github, so this warning about this basic capability (which is often taken for granted) is certainly useful.

JonChesterfield|2 years ago

Can unicode be implemented in a thousand lines or so of C?

vidarh|2 years ago

Define implementing Unicode. If you want to support rtl/bidi and grapheme clusters and every little detail, probably not.

But 99% of the utility for most people is there if you can find the right column, and. move left and right by character instead of byte, and can output UTF8 sequences correctly. In C it's a minor pain, but not impossible.

torstenvl|2 years ago

Rudimentary BMP support, probably. You basically have to account for combining characters and double-width characters.

Emojis and multi-character* presentation form code points like U+FDFD would take a lot more work to do correctly.

* I'm using "character" here in the linguistic sense. Unicode did not invent the word "character" and it doesn't only mean code points.