tracker issue : CF-4204292

select a category, or use search below
(searches all categories and all time range)
Title:

ReplaceNoCase doesn't properly handle 2-byte characters (emojis)

| View in Tracker

Status/Resolution/Reason: To Fix//BugReVerified

Reporter/Name(from Bugbase): CHRIS Z. / ()

Created: 05/06/2019

Components: Language

Versions: 2018

Failure Type: Data Corruption

Found In Build/Fixed In Build: 2018 Update 3 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2016

Vote Count: 4

Problem Description:
Strings that contain emojis (and presumably other 2-byte characters) cause ReplaceNoCase (and presumably other Replace functions) to be off

Steps to Reproduce:
https://trycf.com/gist/50a6946dab826eb37e519c4d2ebe2a45/acf2018?theme=monokai

Code works on CF 11
https://trycf.com/gist/492def93db98e2e175d76e4d3e048493/acf11?theme=monokai

Seems related to these two bugs from CF 2016 (both of which are marked "Closed"):
https://tracker.adobe.com/#/view/CF-4198412
https://tracker.adobe.com/#/view/CF-4150357

Attachments:

Comments:

Is there a timeline for this being fixed? It's preventing us from migrating from CF11 to CF2018 and CF11 is no longer supported. Thanks.
Comment by CHRIS Z.
30729 | May 14, 2019 03:19:22 PM GMT
Weirdly it seems to work fine with ReReplaceNoCase in ACF2018: Example: https://trycf.com/gist/be41120f1b5a67c694db16a53e33a1d8/acf2018?theme=monokai
Comment by John W.
30851 | May 30, 2019 08:21:24 AM GMT
I noticed that too. Looking at the docs, they changed the 3rd argument for ReplaceNoCase to a callback. https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-m-r/replacenocase.html I'm guessing that was the breaking change. (REReplaceNoCase doesn't use the callback)
Comment by CHRIS Z.
30855 | May 30, 2019 01:54:44 PM GMT