Item 547207
You host a web shop that is selling classic albums. But the database that provides the content for the shop is classic too and is still using ISO-8859-1 encoding.
The data is stored on another server than the shop's front-end server. The front-end server retrieves XML data by sending HTTP requests to the data server. The data server uses PHP for generating content and an example of what it might send in response to a request is given below:
<?php header("Content-type: text/xml"); echo "<?xml version='1.0' encoding='ISO-8859-1'?>"; ?> <album> <zce-question> <title>Al Verte las Flores Lloran</title> <artist>Camarón de la Isla and Paco de Lucía</artist> <tracks> <track no="1"> <zce-question> <title>Al verte las flores lloran</title> <palo>Bulerías</palo> </track> <track no="2"> <zce-question> <title>En una piedra me acosté</title> <palo>Fandangos</palo> </track> <track no="3"> <zce-question> <title>Anda y no presumas más</title> <palo>Bulerías por soleá</palo> </track> </tracks> </album>
On some day a new system administrator is appointed and he/she decides that is time to get up to date. So he/she edits the php.ini
file on the server, adds the line default_charset = utf-8
to it and restarts the server.
What happens?
A: Nothing because the encoding is given in the file.
B: Nothing, but the data send by the server will now be valid UTF-8 encoded data.
C: All the strange characters will be displayed like "Camarón" or "acosté".
D: All the strange characters will be displayed like "Camar�n" or "acost�".
E: The front-end server will not be able to parse the data.