I have a feed from which I am retrieving data from a database. It provides data in XML format. However, the data includes “illegal” characters. For instance:
A GREAT NEIGHBOURHOOD â€" WITH A
or
large “country style†eat-in
or
Garage 14’x32’, large
or
OR…….ENDLESS POSSIBILITIES!!
My question is first, how to determine the encoding of these characters, and secondly, how to change the encoding in accordance with the UTF8 format expected by my database?
EDIT: To be clear, there is no database in this process (at this stage of the process, anyway). The data will be added to the database later, but for now I am just reading the data through a PHP script and printing it on the screen using var_dump .
EDIT 2: data retrieved from RETS channel using PHP PHRETS library
source share