Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP utf8_decode — Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable characters

<?php
// Convert the string 'Zoë' from UTF-8 to ISO 8859-1
$utf8_string = "x5Ax6FxC3xAB";
$iso8859_1_string = utf8_decode($utf8_string);
echo bin2hex($iso8859_1_string), "
";

// Invalid UTF-8 sequences are replaced with '?'
$invalid_utf8_string = "xC3";
$iso8859_1_string = utf8_decode($invalid_utf8_string);
var_dump($iso8859_1_string);

// Characters which don't exist in ISO 8859-1, such as
// '€' (Euro Sign) are also replaced with '?'
$utf8_string = "xE2x82xAC";
$iso8859_1_string = utf8_decode($utf8_string);
var_dump($iso8859_1_string);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: slideshow php 
Php :: Reading the Blockchain PHP code 
Php :: ubuntu PHP Installation broken - shows strange php code as response 
Php :: alert in php after header location 
Php :: exe:/usr/local/bin/php 
Php :: data types of laravel migrations 
Php :: Attempt to read property "headers" on string 
Php :: wordpress plugin public page 
Php :: Header requirements for new plugin in wordpress 
Php :: php switch case 
Php :: php import 
Php :: unisharp laravel, Tai anh? 
Php :: exists:categories,id except a value laravel 
Php :: code on editing an image in database in php 
Php :: pengulangan php 
Php :: create json file in php and write n php 
Php :: requires ext-pcntl 
Php :: contact us page mail prestashop 
Php :: php docblock 
Php :: magento2 migration 
Php :: execcommand insert video 
Php :: Detect Browsers Windows|Linux|Mac|Mobile PHP Code 
Php :: laravel migration unknown column type double requested 
Php :: @parent, @include, @show blade in laravel 
Php :: woo can not change products perpage in shop page 
Php :: Who developed Laravel? 
Php :: Dein Benutzer-Profil um weitere Social Media Accounts erweitern 
Php :: laravel foreach localstorage 
Php :: ?id=$1&user=$2 
Php :: how to rrestart brew php 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =