4 ms·
I think it’s because the library, when standing alone, would need to include the entire Unicode database. What I wonder is, when you install the library from a
by CaliforniaKarl 7y ago
I think it’s because the library, when standing alone, would need to include the entire Unicode database. What I wonder is, when you install the library from a distribution’s package manager, does it package that data separately (so that it can hopefully be used by related software)?
- derefr 7y agoProbably not. I would guess, from working with similar “static-data-heavy” libraries, that much of the data is “burned into” the libicu in the form of lookup functions that execute native-code representations of decision trees to give their responses. This data is meant to be “used by related software” by just linking libicu and asking it about the data. Though, this does mean that in language runtimes that don’t want to pull in native libraries (because the runtime is trying to ensure some guarantee like soft-realtime or fault-tolerance), libicu can’t be linked, so the runtime actually has to do the same thing it does, if it wants to have efficient Unicode lookup to the level that people expect: ship a copy of the database files from Unicode.org with the source, and convert them into source-code representations of decision-tree functions. The language I’m most familiar with, Elixir, employs this strategy to support Unicode; see e.g. https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex https://github.com/elixir-lang/elixir/blob/master/lib/elixir...
- Pete_D 7y agoI've seen many distros provide a unicode-data package, containing the human-readable text files from the Unicode Character Database. These are sometimes handy to have around, but I'd be surprised if much software used them directly.