سؤال

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.

هل كانت مفيدة؟

المحلول

Try replacing with this

<cfset lastname = replacelist(lastname, chr(160), '')>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top