<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 27 April 2015 at 01:05, Douglas McKenna <span dir="ltr"><<a href="mailto:doug@mathemaesthetics.com" target="_blank">doug@mathemaesthetics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Joseph Wright wrote:<br>
<br>
> \def\"{0}\expandafter\def\csname^^^^^00022\endcsname{1}<br>
> \ifnum\"=0 \message{tex82}\else\message{newstuff}\fi<br>
<br>
</span>When I implemented a Unicode escape sequence extension using double-caret notation in the JSBox TeX-language interpreter I've been working on (which is all 21-bit Unicode internally, all the time, but can be configured at run-time to be 8-bit input only), I was unaware of what XeTeX had implemented, so I just used<br>
<br>
^^uxxxx (for 16-bit, BMP codes)<br>
^^Uxxxxxx (for all 21-bit Unicode code points)<br>
<br>
Seemed straightforward enough.<br></blockquote><div><br></div><div>Introducing incompatible syntax for functionality shared across Unicode TeX extensions<br></div><div>is a major headache for package authors. Please don't use this syntax! <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
In the first case, if any one of the four 'x's is not a lowercase hex digit, interpretation reverts to the standard TeX escape sequence ^^u (ASCII '5'), followed by four input characters, at least one of which is not a hex digit. Similarly for the six hex digit case, for whatever character ^^U converts to, if at least one of the six characters following is not a hex digit.<br></blockquote><div><br></div><div>In the abstract this isn't an unreasonable syntax but ^^^^,^^^^^,^^^^^^ has been in use for years<br></div><div>in xetex and luatex. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Given that the number of TeX input files using ^^u is likely miniscule, and the number of those that follow the ^^u or ^^U with four or six hex digits is even smaller, it seemed like a worthwhile benefit vs. cost, compatibility-wise. Maybe there's something I've not thought out well.<br></blockquote><div><br></div><div>Incompatible syntax makes supporting cross platform formats like latex much more difficult than it would otherwise be,<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This discussion I just found is both pertinent and frightening, I suppose:<br>
<br>
<a href="http://stackroulette.com/tex/62725/the-notation-in-various-engines" target="_blank">http://stackroulette.com/tex/62725/the-notation-in-various-engines</a></blockquote><div><br></div><div>that's old and relates to old bugs isn't it? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
<br>
Doug McKenna<br>
<div class="HOEnZb"><div class="h5"><br>
<br clear="all"></div></div></blockquote><div><br></div><div>David<br> <br></div></div><br></div></div>