compat.sheenbidi
#includeSheenBidi 3.0.0 — the Unicode bidirectional algorithm (UAX #9, Unicode 17.0.0) in C, Apache-2.0, no dependencies
#include <SheenBidi/SheenBidi.h>
mcpp add compat.sheenbidi@3.0.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// compat.sheenbidi — the Unicode bidirectional algorithm, on text that needs it.
//
// WHAT THIS ASSERTS AND WHY
//
// The Unicode tables are most of the package: Source/Data/*Lookup.c encode the
// Unicode Character Database, and a build that compiled none of them would not
// link — but one that compiled stale ones would, and would quietly get new
// scripts wrong. So every check asks the library a question whose answer is in
// a table or in the algorithm over it:
//
// the version SBVersionGetString, the linked library's own string
// bidi types BidiTypeLookup.c — L, R, AL, EN, AN
// Unicode 17.0.0 a Sidetic letter (new in 17.0) is R and Sidetic
// general category GeneralCategoryLookup.c
// mirroring, brackets PairingLookup.c — "(" mirrors to ")"
// scripts ScriptLookup.c, the script locator over mixed text
// paragraphs the base level from the first strong character
// lines and runs UAX #9 itself: runs in visual order, with levels
// the mirror locator which characters of a line are drawn mirrored
// UTF-8 and UTF-16 the same answer whatever the code units
//
// A pass means the tarball's committed tables were compiled, through the unity
// …
tests/examples/sheenbidi/tests/sheenbidi.cpp · project tests/examples/sheenbidi
Build
- targets
sheenbidi (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/Headers
Sources (1)
*/Source/SheenBidi.c