PHP Classes

File: gen-table.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Convert String from UTF8   gen-table.php   Download  
File: gen-table.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Convert String from UTF8
Convert a string from UTF-8
Author: By
Last change:
Date: 3 years ago
Size: 339 bytes
 

Contents

Class file image Download
<?php /** @noinspection SpellCheckingInspection */


$utf8 = fopen("utf8.txt", "r");
$cp1250 = fopen("cp1250.txt","r");

echo
"[\n";
do {
   
$u8c = trim(fgets($utf8));
   
$c1c = trim(fgets($cp1250));
    echo
'"'.bin2hex($c1c).'" => "'.bin2hex($u8c).'", // '.$u8c."\n";
} while(!
feof($utf8));
echo
"];\n";
fclose($utf8);
fclose($cp1250);