Changeset 1e3ba37 in github


Ignore:
Timestamp:
Sep 9, 2010 7:47:29 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
fa79128
Parents:
4d7acb3
Message:
  • Small improvement for last commit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/main.inc

    r4d7acb3 r1e3ba37  
    389389    } 
    390390  // LATIN 
    391   else if (preg_match('/(CSISOLATIN|LATIN)(.*)/', $str, $m)) { 
     391  else if (preg_match('/LATIN(.*)/', $str, $m)) { 
    392392    $aliases = array('2' => 2, '3' => 3, '4' => 4, '5' => 9, '6' => 10, 
    393393        '7' => 13, '8' => 14, '9' => 15, '10' => 16, 
    394         'ARABIC' => 6, 'CYRILLIC' => 5, 'GREEK' => 7, 'HEBREW' => 8); 
     394        'ARABIC' => 6, 'CYRILLIC' => 5, 'GREEK' => 7, 'GREEK1' => 7, 'HEBREW' => 8); 
    395395 
    396396    // some clients sends windows-1252 text as latin1, 
    397397    // it is safe to use windows-1252 for all latin1 
    398     if ($m[2] == 1) { 
     398    if ($m[1] == 1) { 
    399399      $result = 'WINDOWS-1252'; 
    400400      } 
    401401    // if iconv is not supported we need ISO labels, it's also safe for iconv 
    402     else if (!empty($aliases[$m[2]])) { 
    403       $result = 'ISO-8859-'.$aliases[$m[2]]; 
     402    else if (!empty($aliases[$m[1]])) { 
     403      $result = 'ISO-8859-'.$aliases[$m[1]]; 
    404404      } 
    405405    // iconv requires convertion of e.g. LATIN-1 to LATIN1 
Note: See TracChangeset for help on using the changeset viewer.