2017 S. Elm Pl Suite 105 Broken Arrow, OK

Top

† VS † Can You Tell The Difference

† VS † Can You Tell The Difference

† VS † Can You Tell The Difference

As developers we recycle code regularly as an attempt to maintain efficiency. The other day I was enhancing some results on a report for one of our sites. The task didn’t seem like a big deal as we have other reports on the same site that perform in the same manner. So I fire up Dreamweaver, open the page I need to modify and then open a second page which I know contains a function I will need to complete the modification.

After copying the function to the new file and loading the newly modified page in a browser, I notice the new data is not displaying correctly.  After a little bit of trouble shooting and some wondering if I am going crazy, I determine that the issue is with a split statement.

You see the freshly copied function retrieves data from a table field in the site’s database and then splits the data on a dagger. For some reason my split statement was not seeing the dagger. So I opened a new, blank, page and inserted just the function with its required database connection of course and ran the file. Same problem, as this point I am fairly certain I am going crazy. So I enlist some fresh eyes to look at the code and tell me what, most likely simple, syntax issue I am missing. Everything looks right he says, it should work.

Since the syntax is confirmed to be correct I began checking Dreamweaver’s encoding settings. It turns out when the page was originally written it was encoded as Western European and I was of course using UTF-8. So I resaved the page with UTF-8 encoding and voila the function works perfectly.  In the end it turned out that   =   IS FALSE, if the two symbols are encoded differently.

By: Matthew Maennche

Source: SkyNet Solutions