tracker issue : CF-4198412

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

ReplaceNoCase and unicode return the wrong result

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Daniel Besold / Daniel Besold ()

Created: 03/20/2017

Components: Language, Functions

Versions: 2016,11.0,10.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 11,0,11,292866 / CF 2016 Update 5

Priority/Frequency: Normal / Some users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 1

Problem Description:
The replacement with replaceNoCase does not return the correct value, if the string contains too many unicode characters

Steps to Reproduce:
<cfsavecontent variable="testString">
	?<**N**><br />Fäü
</cfsavecontent>

<cfset replaceString = "<**N**>">
<cfset replaceValue = "DER?N">

<cfoutput>#HtmlEditFormat(ReplaceNoCase(testString, replaceString, replaceValue, "all"))#<br></cfoutput>


Actual Result:
?DER?N<br />Fäü

Expected Result:
?<DER?Nbr />Fäü

Any Workarounds:
None, if you need to use unicode characters

Attachments:

  1. October 26, 2017 00:00:00: CF-4198412.cfm

Comments:

Actual Result and expected result should be switched, it returns the result I wrote under "expected result"
Comment by Daniel B.
1058 | March 20, 2017 02:07:33 PM GMT
Is it not possible to attach a file to a bug reported here? I copy your code to a .cfm file in UTF-8 encoding and see no error. Bug reads "Reason Code: BugVerified", however.
Comment by Bernhard D.
1059 | October 26, 2017 12:25:33 PM GMT