Lucee 6.2 reEscape() CF parity

I’ve run into an issue with ReEscape() in Lucee where the output does not match Adobe ColdFusion’s behavior, particularly when the input contains Emoji or other non-BMP Unicode characters. See attached examples.

I have a workaround in place using a custom UDF so it’s not a show stopping bug, but left me scratching my head for a little while.

Thanks!

Expected output:

Lucee:

Environment

  • Lucee: 6.2.3.35
  • Java: 21.0.9 (Eclipse Adoptium)
  • Tomcat: 11.0.13
  • OS: Windows