I am wondering if there is a way to provide the
\XeTeXglyph as input and get the the character code (preferably in hexidecimal) as output.
I've been doing many experiments with Generating a table of glyphs with XeTeX. The XeTeX reference manual mentions a few commands:
According to the manual, you can look up characters by
\XeTeXglyphname⟨font⟩ ⟨glyph slot⟩
\XeTeXglyphindex"⟨glyph name⟩" ⟨space⟩ or \relaxx
This would be an insanely useful feature.