n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/dict.php

37 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2023-04-30 21:28:42 +02:00
<?php
$filename = "./fr_es.wb";
$nbstrings = filesize($filename)/84;
$string = file ($filename);
for($i = 0 ; $i < $nbstrings ; $i++)
{
$chaine = substr($string[0],$i*84,84);
$chaine = str_replace("é","e", $chaine);
$chaine = str_replace("<EFBFBD>","e", $chaine);
$chaine = str_replace("<EFBFBD>","a", $chaine);
$chaine = str_replace("<EFBFBD>","o", $chaine);
//$chaine = str_replace("<22>","c", $chaine);
$chaine = str_replace("è","e", $chaine);
$chaine = str_replace("ô","o", $chaine);
$chaine = str_replace("ê","e", $chaine);
$chaine = str_replace("ë","e", $chaine);
$chaine = str_replace("<EFBFBD>| ","a", $chaine);
$chaine = str_replace("ç","c", $chaine);
$chaine = str_replace("ï","i", $chaine);
$chaine = str_replace("û","u", $chaine);
$chaine = str_replace("î","i", $chaine);
$chaine = str_replace("ö","o", $chaine);
$chaine = str_replace("~R","'", $chaine);
//$chaine = str_replace("~S","&laquo;", $chaine);
//$chaine = str_replace("~T","&raquo;", $chaine);
$chaine = str_replace("<EFBFBD>","", $chaine);
$chaine = str_replace("<EFBFBD>","cx", $chaine);
//$chaine = str_replace("<22>","&laquo;", $chaine);
//$chaine = str_replace("& ","&amp;", $chaine);
//$chaine = str_replace($chaine, "","");
echo trim(substr($chaine, 0, 30))."@English@".trim(substr($chaine,31,54));
echo "\n";
}
?>