ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
CodePage.php
Go to the documentation of this file.
1 <?php
37 {
46  public static function NumberToName($codePage = 1252)
47  {
48  switch ($codePage) {
49  case 367: return 'ASCII'; break; // ASCII
50  case 437: return 'CP437'; break; // OEM US
51  case 720: throw new PHPExcel_Exception('Code page 720 not supported.');
52  break; // OEM Arabic
53  case 737: return 'CP737'; break; // OEM Greek
54  case 775: return 'CP775'; break; // OEM Baltic
55  case 850: return 'CP850'; break; // OEM Latin I
56  case 852: return 'CP852'; break; // OEM Latin II (Central European)
57  case 855: return 'CP855'; break; // OEM Cyrillic
58  case 857: return 'CP857'; break; // OEM Turkish
59  case 858: return 'CP858'; break; // OEM Multilingual Latin I with Euro
60  case 860: return 'CP860'; break; // OEM Portugese
61  case 861: return 'CP861'; break; // OEM Icelandic
62  case 862: return 'CP862'; break; // OEM Hebrew
63  case 863: return 'CP863'; break; // OEM Canadian (French)
64  case 864: return 'CP864'; break; // OEM Arabic
65  case 865: return 'CP865'; break; // OEM Nordic
66  case 866: return 'CP866'; break; // OEM Cyrillic (Russian)
67  case 869: return 'CP869'; break; // OEM Greek (Modern)
68  case 874: return 'CP874'; break; // ANSI Thai
69  case 932: return 'CP932'; break; // ANSI Japanese Shift-JIS
70  case 936: return 'CP936'; break; // ANSI Chinese Simplified GBK
71  case 949: return 'CP949'; break; // ANSI Korean (Wansung)
72  case 950: return 'CP950'; break; // ANSI Chinese Traditional BIG5
73  case 1200: return 'UTF-16LE'; break; // UTF-16 (BIFF8)
74  case 1250: return 'CP1250'; break; // ANSI Latin II (Central European)
75  case 1251: return 'CP1251'; break; // ANSI Cyrillic
76  case 0: // CodePage is not always correctly set when the xls file was saved by Apple's Numbers program
77  case 1252: return 'CP1252'; break; // ANSI Latin I (BIFF4-BIFF7)
78  case 1253: return 'CP1253'; break; // ANSI Greek
79  case 1254: return 'CP1254'; break; // ANSI Turkish
80  case 1255: return 'CP1255'; break; // ANSI Hebrew
81  case 1256: return 'CP1256'; break; // ANSI Arabic
82  case 1257: return 'CP1257'; break; // ANSI Baltic
83  case 1258: return 'CP1258'; break; // ANSI Vietnamese
84  case 1361: return 'CP1361'; break; // ANSI Korean (Johab)
85  case 10000: return 'MAC'; break; // Apple Roman
86  case 10001: return 'CP932'; break; // Macintosh Japanese
87  case 10002: return 'CP950'; break; // Macintosh Chinese Traditional
88  case 10003: return 'CP1361'; break; // Macintosh Korean
89  case 10006: return 'MACGREEK'; break; // Macintosh Greek
90  case 10007: return 'MACCYRILLIC'; break; // Macintosh Cyrillic
91  case 10008: return 'CP936'; break; // Macintosh - Simplified Chinese (GB 2312)
92  case 10029: return 'MACCENTRALEUROPE'; break; // Macintosh Central Europe
93  case 10079: return 'MACICELAND'; break; // Macintosh Icelandic
94  case 10081: return 'MACTURKISH'; break; // Macintosh Turkish
95  case 21010: return 'UTF-16LE'; break; // UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
96  case 32768: return 'MAC'; break; // Apple Roman
97  case 32769: throw new PHPExcel_Exception('Code page 32769 not supported.');
98  break; // ANSI Latin I (BIFF2-BIFF3)
99  case 65000: return 'UTF-7'; break; // Unicode (UTF-7)
100  case 65001: return 'UTF-8'; break; // Unicode (UTF-8)
101  }
102 
103  throw new PHPExcel_Exception('Unknown codepage: ' . $codePage);
104  }
105 
106 }
static NumberToName($codePage=1252)
Convert Microsoft Code Page Identifier to Code Page Name which iconv and mbstring understands...
Definition: CodePage.php:46