1

I'm just running a query and forming a JSON string in cfloop.

For some values that are formed within JSON, I see some bogus extra characters at the end. At first, I suspected them to be white spaces or tabs but adding a Trim(name) did not work.

"first_name":"Jon   "

When I copied the string over to Notepad++ and converted it to utf-8, Here is what I am seeing:

"first_name":"Jon  **xA0**"

I am not sure what that xA0 means here. Is there any way to supress this?

Thanks.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Nash3man
  • 155
  • 1
  • 4
  • 15

1 Answers1

2

Try replacing with this

<cfset lastname = replacelist(lastname, chr(160), '')>
James A Mohler
  • 11,060
  • 15
  • 46
  • 72