![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
Hi,
+ v = v - 0x10000
ah, i hadn't noted that line (btw, in the file there is a remark where i add the 0x10000 that it is inconsistent so i should have looked into it then, sigh)
My other suggestion, which does the subtraction only for one surrogate is below.
btw, performance wise the separate step is the same as doing it in the one liner (lua does all via the stack so in general using intermediate steps assiging to (here v) is often quite ok) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------