# [tex-live] \string in xetex

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Apr 28 18:49:38 CEST 2015

```On 28/04/2015 17:08, David Carlisle wrote:
> I asked a similar question on the xetex list but I wonder if anyone here
> has a better grasp than me on the use of utf16 v utf 32 in xetex.web and
> can offer any insight into the use of \string in xetex.
>
> The attached file produces a log of
>
> A=B
> A=C
> A=D
> A=E
> B=C
> B=D
> B=E
> C=D
> C=E
> D=E
>
>
> with luatex, but with xetex it produces
>
> ! Undefined control sequence.
> l.6 \edef\c{\string��
>                        }
> ?
> ! Undefined control sequence.
> l.10 \edef\e{\string��
>                         }
> ?
> A=B
> C=E
>  )
>
>
> which is clearly pretty wrong
>
> (\string is producing two tokens with the UTF-16 representation,
> rather than one token)
>
>
> I don't think it's a show stopper for TL2015 as it's always been that way
> as far as I can see, but it would be nice to fix it, but my attempts to do
> so have taught me a lot about the web sources but not produced anything
> usable.
>
>
> David

An aside here. With

\edef\c{\string��}

I'd expect an error as �� is a letter in UnicodeData.txt

1D400;MATHEMATICAL BOLD CAPITAL A;Lu;0;L;<font> 0041;;;;N;;;;;

With LaTeX in TL'15 you see that with both XeTeX and LuaTeX as both are