Hi Christian,

Curiously, char('dagger') gives me † and char('Dagger') gives me ‡. char('DAGGER') returns an error: "[FOCH0005] Invalid name, glyph or codepoint value: DAGGER (similar: Dagger)."

None of the case permutations of character:getName(0x2021) which is "DOUBLE DAGGER" are acceptable to `char()`. The numeric, 0x2021, works. (The optimizer happily reduces all of these that work to string literals.)

I'm using BaseX 12.3, if that should be relevant.

Thanks!
Graydon

On Mon, May 25, 2026, at 11:26, Christian Grün via BaseX-Talk wrote:
You can also do:

char('dagger'),
char(0x2020)


________________________________________
Von: Martin Honnen via BaseX-Talk <basex-talk@mailman.uni-konstanz.de>
Gesendet: Montag, 25. Mai 2026 17:16
An: basex-talk@mailman.uni-konstanz.de
Betreff: [basex-talk] Re: Access to the Unicode Character Database from XQuery?


On 25/05/2026 17:03, Graydon Saunders via BaseX-Talk wrote:
>
> I am currently exploring what to do when a footnote callout, which
> will wind up in an xs:ID value, is something like U+2020 DAGGER; one
> obvious way is to use the character name. (So instead of an @id value
> of `Fn1` I'd have `Fndagger` or similar.)
>
> I see that the current draft of XPath 4.0 has new-since-3.0
> `characters()` and `grapheme()` functions, but so far as I may tell it
> does not have a way to get UCD properties for a codepoint.
>
> Is there an XQuery (or BaseX) way to do this?
>

You can call Java

declare namespace character = "java:java.lang.Character";

character:getName(0x2020)