utf8_decode 


TRANSLATES an  UTF-8  string to  ISO-8859-1 .

Inverse function of  utf8_encode .





This function integrates the cast of  standard  library functions.

Included in this section for being in common use.



<?php

str utf8_decode 
str $data )


where,

$data An UTF-8 encoded STRING

?>

  $data   


An UTF-8 encoded STRING.



 NOTE FROM php.net about utf8_decode 


Many web pages marked as using the ISO-8859-1 character encoding actually use the similar Windows-1252 encoding, and web browsers will interpret ISO-8859-1 web pages as Windows-1252.

Windows-1252 features additional printable characters, such as the Euro sign (€) and curly quotes (“ ”), instead of certain ISO-8859-1 control characters.

This function will not convert such Windows-1252 characters correctly.

Use a different function if Windows-1252 conversion is required.

This function converts the string data from the UTF-8 encoding to ISO-8859-1.

Bytes in the string which are not valid UTF-8, and UTF-8 characters which do not exist in ISO-8859-1, (that is, characters above U+00FF), are replaced with ?.



  1 EXERCISE   

<?php

$airp 
'São Paulo/Guarulhos, Governador André Franco Montoro International Airport, (IATA: GRU, ICAO: SBGR), often referred to as GRU Airport, or simply GRU, is the primary international airport serving São Paulo. It is popularly known locally as either Cumbica Airport, after the district where it is located and the Brazilian Air Force base that still exists at the airport complex, or Guarulhos Airport, after the municipality of Guarulhos, in the São Paulo, where it is located. Since November 28, 2001 the airport has been named after André Franco Montoro, (1916-1999), former Governor of São Paulo state. The airport was rebranded as GRU Airport in 2012. In Brazil the airport was ranked first in terms of transported passengers, aircraft operations, and cargo handled in 2012, placing it as the second busiest airport in Latin America by passenger traffic, (36,596,326 in 2016), after Mexico City International Airport. Guarulhos has slot restrictions, operating with a maximum of 45 operations/hour and being one of the five airports with such restrictions in Brazil (the others are São Paulo-Congonhas, Brasília, Belo Horizonte-Pampulha and Rio de Janeiro-Santos Dumont). Since 2012, the airport has been operated by a consortium composed of Invepar S/A, Airports Company South Africa, and Infraero. Some of its facilities are shared with the São Paulo Air Force Base of the Brazilian Air Force.';

$utf8dec utf8_decode($airp);

echo 
$utf8dec;

?>

 RESULT   

 UTF-8 

São Paulo/Guarulhos, Governador André Franco Montoro International Airport, (IATA: GRU, ICAO: SBGR), often referred to as GRU Airport, or simply GRU, is the primary international airport serving São Paulo. It is popularly known locally as either Cumbica Airport, after the district where it is located and the Brazilian Air Force base that still exists at the airport complex, or Guarulhos Airport, after the municipality of Guarulhos, in the São Paulo, where it is located. Since November 28, 2001 the airport has been named after André Franco Montoro, (1916-1999), former Governor of São Paulo state. The airport was rebranded as GRU Airport in 2012. In Brazil the airport was ranked first in terms of transported passengers, aircraft operations, and cargo handled in 2012, placing it as the second busiest airport in Latin America by passenger traffic, (36,596,326 in 2016), after Mexico City International Airport. Guarulhos has slot restrictions, operating with a maximum of 45 operations/hour and being one of the five airports with such restrictions in Brazil (the others are São Paulo-Congonhas, Brasília, Belo Horizonte-Pampulha and Rio de Janeiro-Santos Dumont). Since 2012, the airport has been operated by a consortium composed of Invepar S/A, Airports Company South Africa, and Infraero. Some of its facilities are shared with the São Paulo Air Force Base of the Brazilian Air Force.

 ISO-8859-1 

São Paulo/Guarulhos, Governador André Franco Montoro International Airport, (IATA: GRU, ICAO: SBGR), often referred to as GRU Airport, or simply GRU, is the primary international airport serving São Paulo. It is popularly known locally as either Cumbica Airport, after the district where it is located and the Brazilian Air Force base that still exists at the airport complex, or Guarulhos Airport, after the municipality of Guarulhos, in the São Paulo, where it is located. Since November 28, 2001 the airport has been named after André Franco Montoro, (1916-1999), former Governor of São Paulo state. The airport was rebranded as GRU Airport in 2012. In Brazil the airport was ranked first in terms of transported passengers, aircraft operations, and cargo handled in 2012, placing it as the second busiest airport in Latin America by passenger traffic, (36,596,326 in 2016), after Mexico City International Airport. Guarulhos has slot restrictions, operating with a maximum of 45 operations/hour and being one of the five airports with such restrictions in Brazil (the others are São Paulo-Congonhas, Brasília, Belo Horizonte-Pampulha and Rio de Janeiro-Santos Dumont). Since 2012, the airport has been operated by a consortium composed of Invepar S/A, Airports Company South Africa, and Infraero. Some of its facilities are shared with the São Paulo Air Force Base of the Brazilian Air Force.