High Ascii strikes again (with CFMAP)

This post is more than 2 years old.

I was diagnosing an issue with the maps feature at Adobe Groups. For some reason the map simply stopped working. No CF error - nothing odd in the source - but the map didn't render. The basic logic of the map is to simply loop over all the groups with geolocation data and add them as markers. To debug, I simply switched from looping over all the rows to looping over 50 at a time. Doing that I was able to find a range that caused the map to not display. I then slowly shrunk this down to one record and finally one string. At this point I began to wonder if some odd character was breaking the map. Nothing looked wrong, but I've seen this in the past with other applications. Here is the code I used to look for the character.

<cfset str = g.getAddress() > <cfloop index="c" from="1" to="#len(str)#"> <cfset char = mid(str, c, 1)> <cfoutput>#char#=#asc(char)#<br></cfoutput> </cfloop>

This code loops over every character and prints out the ascii code for each. Check out the result:

Yeah, see it? I wrapped up a call to the UDF that Ben Nadel wrote and it helped right away.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com