Keep in mind that I appreciated your comment. My library has a very narrow target
There is an MJB_FEATURE_CHARACTER_NAMES option you can set to zero if you don't want to have a function that returns the name of a codepoint, such as "LATIN SMALL LETTER E WITH ACUTE". This is something that probably most people do not need at all. This shrinks "Hello World" macOS ARM executable from 937KB to 663KB.
I should probably offer other runtime options so users can literally strip away everything they don't need. For example, as you suggested, measuring whether a string is less than 80 columns is something you don't do every day.
(Author here) Dealing with encodings is already a big step when you aim to handle multiple ones and multiple OSes. You can see what I am talking about in the tests/ folder.
With Mojibake, I wanted to help people handle text by providing the smallest possible C/C++ library, without requiring them to use a +20MB library just to normalize a string, handle a flag emoji, or perform similar tasks.
See the CONFORMANCE_REQUIREMENTS.md file if you are interested in what the +17 versions of the Unicode standard have introduced.
Mojibake is a C library, not Python, so comparing the two isn't ideal. You can see the performance in the GitHub workflows results. At the end of the logs, there is an "execution time" line.
Thank you very much. I've also started writing a smaller C++ wrapper so the user can use std::string_view for this, but I'm not the best C++ guy out there.
Mojibake handle UTF-8, UTF-16, UTF-16LE, UTF-16BE, UTF-32, UTF-32LE, UTF-32BE in input and output. Can be used as a simple file and handle a wider number of algorithms, such as the "confusable" one.
Yes, I'm the author. I began writing this library because I needed something to handle Unicode for another project of mine (that I didn't finish), and I didn't like ICU4C or the other libraries I found.
It's a hobby project I wrote because I find the Unicode standard (sometimes unnecessary) complexity fascinating. And for other people to use, if needed.
The HTML page is static and generated at compile time. Every function has a little form to test the WASM function.
I am working on Mojibake, a small C library to handle Unicode data. I don't like the other libraries, so I’m building one myself. https://github.com/zaerl/mojibake
This is interesting. I simply do not connect my TV to the Internet and choose Apple TV, which gives me everything I need. Modern “smart TVs” are just ad terminals. That's why I think they are relatively cheap.
The best thing you can do is make your TV dumb by not connecting to the internet. Then use an Apple TV or whatever Android stick there are on commerce.