|
@@ 407-411 (lines=5) @@
|
| 404 |
|
default: |
| 405 |
|
// mbstring presente ? |
| 406 |
|
if (init_mb_string()) { |
| 407 |
|
if ($order = mb_detect_order() # mb_string connait-il $charset? |
| 408 |
|
and mb_detect_order($charset) |
| 409 |
|
) { |
| 410 |
|
$s = mb_convert_encoding($texte, 'utf-8', $charset); |
| 411 |
|
if ($s && $s != $texte) { |
| 412 |
|
return utf_8_to_unicode($s); |
| 413 |
|
} |
| 414 |
|
} |
|
@@ 524-531 (lines=8) @@
|
| 521 |
|
// on traite le cas le plus frequent iso-8859-1 vers utf directement pour aller plus vite ! |
| 522 |
|
if (($charset == 'iso-8859-1') && ($GLOBALS['meta']['charset'] == 'utf-8')) { |
| 523 |
|
$texte = corriger_caracteres_windows($texte, 'iso-8859-1', $GLOBALS['meta']['charset']); |
| 524 |
|
if (init_mb_string()) { |
| 525 |
|
if ($order = mb_detect_order() # mb_string connait-il $charset? |
| 526 |
|
and mb_detect_order($charset) |
| 527 |
|
) { |
| 528 |
|
$s = mb_convert_encoding($texte, 'utf-8', $charset); |
| 529 |
|
} |
| 530 |
|
mb_detect_order($order); # remettre comme precedemment |
| 531 |
|
return $s; |
| 532 |
|
} |
| 533 |
|
// Sinon, peut-etre connaissons-nous ce charset ? |
| 534 |
|
if (!isset($trans[$charset])) { |