Hi out there,
I have a problem that is Unicode related. Some Unicode characters (for instance
emojis) can have some code *following* the actual character to indicate a
variant. For instance in the following stylesheet, the emoji character in $x
(U+1F61C) is followed by U+DE1C. When I look in oXygen it shows me this. But
when I run the stylesheet it reports a string length of 1 and only a single
codepoint.
I suppose that is true, it is only single character. But how can I find out
(in XPath) what the value of the second “character” (indicator?) is? Or is that
impossible anyway?
Thanks,
Erik Siegel
PS Running this in the latest oXygen using Saxon 9.8.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" expand-text="true">
<xsl:template match="/">
<xsl:variable name="x" as="xs:string" select="'😜'"/>
<test length="{string-length($x)}">{ string-to-codepoints($x) }</test>
</xsl:template>
</xsl:stylesheet>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--