Вопрос

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