2010-03-02 Jb Evain <jbevain@novell.com>
[mcs.git] / class / I18N / MidEast / CP28596.cs
blob17f03bab90ea9dc1815a70e4d97e2be0a4a862a2
1 /*
2 * CP28596.cs - Arabic (ISO) code page.
4 * Copyright (c) 2002 Southern Storm Software, Pty Ltd
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
25 // Generated from "windows-28596-2000.ucm".
27 namespace I18N.MidEast
30 using System;
31 using System.Text;
32 using I18N.Common;
34 [Serializable]
35 public class CP28596 : ByteEncoding
37 public CP28596()
38 : base(28596, ToChars, "Arabic (ISO)",
39 "iso-8859-6", "iso-8859-6", "iso-8859-6",
40 true, true, true, true, 1256)
43 private static readonly char[] ToChars = {
44 '\u0000', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005',
45 '\u0006', '\u0007', '\u0008', '\u0009', '\u000A', '\u000B',
46 '\u000C', '\u000D', '\u000E', '\u000F', '\u0010', '\u0011',
47 '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017',
48 '\u0018', '\u0019', '\u001A', '\u001B', '\u001C', '\u001D',
49 '\u001E', '\u001F', '\u0020', '\u0021', '\u0022', '\u0023',
50 '\u0024', '\u0025', '\u0026', '\u0027', '\u0028', '\u0029',
51 '\u002A', '\u002B', '\u002C', '\u002D', '\u002E', '\u002F',
52 '\u0030', '\u0031', '\u0032', '\u0033', '\u0034', '\u0035',
53 '\u0036', '\u0037', '\u0038', '\u0039', '\u003A', '\u003B',
54 '\u003C', '\u003D', '\u003E', '\u003F', '\u0040', '\u0041',
55 '\u0042', '\u0043', '\u0044', '\u0045', '\u0046', '\u0047',
56 '\u0048', '\u0049', '\u004A', '\u004B', '\u004C', '\u004D',
57 '\u004E', '\u004F', '\u0050', '\u0051', '\u0052', '\u0053',
58 '\u0054', '\u0055', '\u0056', '\u0057', '\u0058', '\u0059',
59 '\u005A', '\u005B', '\u005C', '\u005D', '\u005E', '\u005F',
60 '\u0060', '\u0061', '\u0062', '\u0063', '\u0064', '\u0065',
61 '\u0066', '\u0067', '\u0068', '\u0069', '\u006A', '\u006B',
62 '\u006C', '\u006D', '\u006E', '\u006F', '\u0070', '\u0071',
63 '\u0072', '\u0073', '\u0074', '\u0075', '\u0076', '\u0077',
64 '\u0078', '\u0079', '\u007A', '\u007B', '\u007C', '\u007D',
65 '\u007E', '\u007F', '\u0080', '\u0081', '\u0082', '\u0083',
66 '\u0084', '\u0085', '\u0086', '\u0087', '\u0088', '\u0089',
67 '\u008A', '\u008B', '\u008C', '\u008D', '\u008E', '\u008F',
68 '\u0090', '\u0091', '\u0092', '\u0093', '\u0094', '\u0095',
69 '\u0096', '\u0097', '\u0098', '\u0099', '\u009A', '\u009B',
70 '\u009C', '\u009D', '\u009E', '\u009F', '\u00A0', '\uF7C8',
71 '\uF7C9', '\uF7CA', '\u00A4', '\uF7CB', '\uF7CC', '\uF7CD',
72 '\uF7CE', '\uF7CF', '\uF7D0', '\uF7D1', '\u060C', '\u00AD',
73 '\uF7D2', '\uF7D3', '\uF7D4', '\uF7D5', '\uF7D6', '\uF7D7',
74 '\uF7D8', '\uF7D9', '\uF7DA', '\uF7DB', '\uF7DC', '\uF7DD',
75 '\uF7DE', '\u061B', '\uF7DF', '\uF7E0', '\uF7E1', '\u061F',
76 '\uF7E2', '\u0621', '\u0622', '\u0623', '\u0624', '\u0625',
77 '\u0626', '\u0627', '\u0628', '\u0629', '\u062A', '\u062B',
78 '\u062C', '\u062D', '\u062E', '\u062F', '\u0630', '\u0631',
79 '\u0632', '\u0633', '\u0634', '\u0635', '\u0636', '\u0637',
80 '\u0638', '\u0639', '\u063A', '\uF7E3', '\uF7E4', '\uF7E5',
81 '\uF7E6', '\uF7E7', '\u0640', '\u0641', '\u0642', '\u0643',
82 '\u0644', '\u0645', '\u0646', '\u0647', '\u0648', '\u0649',
83 '\u064A', '\u064B', '\u064C', '\u064D', '\u064E', '\u064F',
84 '\u0650', '\u0651', '\u0652', '\uF7E8', '\uF7E9', '\uF7EA',
85 '\uF7EB', '\uF7EC', '\uF7ED', '\uF7EE', '\uF7EF', '\uF7F0',
86 '\uF7F1', '\uF7F2', '\uF7F3', '\uF7F4',
89 protected unsafe override void ToBytes(char* chars, int charCount,
90 byte* bytes, int byteCount)
92 int ch;
93 int charIndex = 0;
94 int byteIndex = 0;
95 #if NET_2_0
96 EncoderFallbackBuffer buffer = null;
97 #endif
98 while(charCount > 0)
100 ch = (int)(chars[charIndex++]);
101 if(ch >= 161) switch(ch)
103 case 0x00A4:
104 case 0x00AD:
105 break;
106 case 0x00A1: ch = 0x21; break;
107 case 0x00A2: ch = 0x63; break;
108 case 0x00A5: ch = 0x59; break;
109 case 0x00A6: ch = 0x7C; break;
110 case 0x00A9: ch = 0x43; break;
111 case 0x00AA: ch = 0x61; break;
112 case 0x00AB: ch = 0x3C; break;
113 case 0x00AE: ch = 0x52; break;
114 case 0x00B2: ch = 0x32; break;
115 case 0x00B3: ch = 0x33; break;
116 case 0x00B7: ch = 0x2E; break;
117 case 0x00B8: ch = 0x2C; break;
118 case 0x00B9: ch = 0x31; break;
119 case 0x00BA: ch = 0x6F; break;
120 case 0x00BB: ch = 0x3E; break;
121 case 0x00C0: ch = 0x41; break;
122 case 0x00C1: ch = 0x41; break;
123 case 0x00C2: ch = 0x41; break;
124 case 0x00C3: ch = 0x41; break;
125 case 0x00C4: ch = 0x41; break;
126 case 0x00C5: ch = 0x41; break;
127 case 0x00C6: ch = 0x41; break;
128 case 0x00C7: ch = 0x43; break;
129 case 0x00C8: ch = 0x45; break;
130 case 0x00C9: ch = 0x45; break;
131 case 0x00CA: ch = 0x45; break;
132 case 0x00CB: ch = 0x45; break;
133 case 0x00CC: ch = 0x49; break;
134 case 0x00CD: ch = 0x49; break;
135 case 0x00CE: ch = 0x49; break;
136 case 0x00CF: ch = 0x49; break;
137 case 0x00D0: ch = 0x44; break;
138 case 0x00D1: ch = 0x4E; break;
139 case 0x00D2: ch = 0x4F; break;
140 case 0x00D3: ch = 0x4F; break;
141 case 0x00D4: ch = 0x4F; break;
142 case 0x00D5: ch = 0x4F; break;
143 case 0x00D6: ch = 0x4F; break;
144 case 0x00D8: ch = 0x4F; break;
145 case 0x00D9: ch = 0x55; break;
146 case 0x00DA: ch = 0x55; break;
147 case 0x00DB: ch = 0x55; break;
148 case 0x00DC: ch = 0x55; break;
149 case 0x00DD: ch = 0x59; break;
150 case 0x00E0: ch = 0x61; break;
151 case 0x00E1: ch = 0x61; break;
152 case 0x00E2: ch = 0x61; break;
153 case 0x00E3: ch = 0x61; break;
154 case 0x00E4: ch = 0x61; break;
155 case 0x00E5: ch = 0x61; break;
156 case 0x00E6: ch = 0x61; break;
157 case 0x00E7: ch = 0x63; break;
158 case 0x00E8: ch = 0x65; break;
159 case 0x00E9: ch = 0x65; break;
160 case 0x00EA: ch = 0x65; break;
161 case 0x00EB: ch = 0x65; break;
162 case 0x00EC: ch = 0x69; break;
163 case 0x00ED: ch = 0x69; break;
164 case 0x00EE: ch = 0x69; break;
165 case 0x00EF: ch = 0x69; break;
166 case 0x00F1: ch = 0x6E; break;
167 case 0x00F2: ch = 0x6F; break;
168 case 0x00F3: ch = 0x6F; break;
169 case 0x00F4: ch = 0x6F; break;
170 case 0x00F5: ch = 0x6F; break;
171 case 0x00F6: ch = 0x6F; break;
172 case 0x00F8: ch = 0x6F; break;
173 case 0x00F9: ch = 0x75; break;
174 case 0x00FA: ch = 0x75; break;
175 case 0x00FB: ch = 0x75; break;
176 case 0x00FC: ch = 0x75; break;
177 case 0x00FD: ch = 0x79; break;
178 case 0x00FF: ch = 0x79; break;
179 case 0x0100: ch = 0x41; break;
180 case 0x0101: ch = 0x61; break;
181 case 0x0102: ch = 0x41; break;
182 case 0x0103: ch = 0x61; break;
183 case 0x0104: ch = 0x41; break;
184 case 0x0105: ch = 0x61; break;
185 case 0x0106: ch = 0x43; break;
186 case 0x0107: ch = 0x63; break;
187 case 0x0108: ch = 0x43; break;
188 case 0x0109: ch = 0x63; break;
189 case 0x010A: ch = 0x43; break;
190 case 0x010B: ch = 0x63; break;
191 case 0x010C: ch = 0x43; break;
192 case 0x010D: ch = 0x63; break;
193 case 0x010E: ch = 0x44; break;
194 case 0x010F: ch = 0x64; break;
195 case 0x0110: ch = 0x44; break;
196 case 0x0111: ch = 0x64; break;
197 case 0x0112: ch = 0x45; break;
198 case 0x0113: ch = 0x65; break;
199 case 0x0114: ch = 0x45; break;
200 case 0x0115: ch = 0x65; break;
201 case 0x0116: ch = 0x45; break;
202 case 0x0117: ch = 0x65; break;
203 case 0x0118: ch = 0x45; break;
204 case 0x0119: ch = 0x65; break;
205 case 0x011A: ch = 0x45; break;
206 case 0x011B: ch = 0x65; break;
207 case 0x011C: ch = 0x47; break;
208 case 0x011D: ch = 0x67; break;
209 case 0x011E: ch = 0x47; break;
210 case 0x011F: ch = 0x67; break;
211 case 0x0120: ch = 0x47; break;
212 case 0x0121: ch = 0x67; break;
213 case 0x0122: ch = 0x47; break;
214 case 0x0123: ch = 0x67; break;
215 case 0x0124: ch = 0x48; break;
216 case 0x0125: ch = 0x68; break;
217 case 0x0126: ch = 0x48; break;
218 case 0x0127: ch = 0x68; break;
219 case 0x0128: ch = 0x49; break;
220 case 0x0129: ch = 0x69; break;
221 case 0x012A: ch = 0x49; break;
222 case 0x012B: ch = 0x69; break;
223 case 0x012C: ch = 0x49; break;
224 case 0x012D: ch = 0x69; break;
225 case 0x012E: ch = 0x49; break;
226 case 0x012F: ch = 0x69; break;
227 case 0x0130: ch = 0x49; break;
228 case 0x0131: ch = 0x69; break;
229 case 0x0134: ch = 0x4A; break;
230 case 0x0135: ch = 0x6A; break;
231 case 0x0136: ch = 0x4B; break;
232 case 0x0137: ch = 0x6B; break;
233 case 0x0139: ch = 0x4C; break;
234 case 0x013A: ch = 0x6C; break;
235 case 0x013B: ch = 0x4C; break;
236 case 0x013C: ch = 0x6C; break;
237 case 0x013D: ch = 0x4C; break;
238 case 0x013E: ch = 0x6C; break;
239 case 0x0141: ch = 0x4C; break;
240 case 0x0142: ch = 0x6C; break;
241 case 0x0143: ch = 0x4E; break;
242 case 0x0144: ch = 0x6E; break;
243 case 0x0145: ch = 0x4E; break;
244 case 0x0146: ch = 0x6E; break;
245 case 0x0147: ch = 0x4E; break;
246 case 0x0148: ch = 0x6E; break;
247 case 0x014C: ch = 0x4F; break;
248 case 0x014D: ch = 0x6F; break;
249 case 0x014E: ch = 0x4F; break;
250 case 0x014F: ch = 0x6F; break;
251 case 0x0150: ch = 0x4F; break;
252 case 0x0151: ch = 0x6F; break;
253 case 0x0152: ch = 0x4F; break;
254 case 0x0153: ch = 0x6F; break;
255 case 0x0154: ch = 0x52; break;
256 case 0x0155: ch = 0x72; break;
257 case 0x0156: ch = 0x52; break;
258 case 0x0157: ch = 0x72; break;
259 case 0x0158: ch = 0x52; break;
260 case 0x0159: ch = 0x72; break;
261 case 0x015A: ch = 0x53; break;
262 case 0x015B: ch = 0x73; break;
263 case 0x015C: ch = 0x53; break;
264 case 0x015D: ch = 0x73; break;
265 case 0x015E: ch = 0x53; break;
266 case 0x015F: ch = 0x73; break;
267 case 0x0160: ch = 0x53; break;
268 case 0x0161: ch = 0x73; break;
269 case 0x0162: ch = 0x54; break;
270 case 0x0163: ch = 0x74; break;
271 case 0x0164: ch = 0x54; break;
272 case 0x0165: ch = 0x74; break;
273 case 0x0166: ch = 0x54; break;
274 case 0x0167: ch = 0x74; break;
275 case 0x0168: ch = 0x55; break;
276 case 0x0169: ch = 0x75; break;
277 case 0x016A: ch = 0x55; break;
278 case 0x016B: ch = 0x75; break;
279 case 0x016C: ch = 0x55; break;
280 case 0x016D: ch = 0x75; break;
281 case 0x016E: ch = 0x55; break;
282 case 0x016F: ch = 0x75; break;
283 case 0x0170: ch = 0x55; break;
284 case 0x0171: ch = 0x75; break;
285 case 0x0172: ch = 0x55; break;
286 case 0x0173: ch = 0x75; break;
287 case 0x0174: ch = 0x57; break;
288 case 0x0175: ch = 0x77; break;
289 case 0x0176: ch = 0x59; break;
290 case 0x0177: ch = 0x79; break;
291 case 0x0178: ch = 0x59; break;
292 case 0x0179: ch = 0x5A; break;
293 case 0x017A: ch = 0x7A; break;
294 case 0x017B: ch = 0x5A; break;
295 case 0x017C: ch = 0x7A; break;
296 case 0x017D: ch = 0x5A; break;
297 case 0x017E: ch = 0x7A; break;
298 case 0x0180: ch = 0x62; break;
299 case 0x0189: ch = 0x44; break;
300 case 0x0191: ch = 0x46; break;
301 case 0x0192: ch = 0x66; break;
302 case 0x0197: ch = 0x49; break;
303 case 0x019A: ch = 0x6C; break;
304 case 0x019F: ch = 0x4F; break;
305 case 0x01A0: ch = 0x4F; break;
306 case 0x01A1: ch = 0x6F; break;
307 case 0x01AB: ch = 0x74; break;
308 case 0x01AE: ch = 0x54; break;
309 case 0x01AF: ch = 0x55; break;
310 case 0x01B0: ch = 0x75; break;
311 case 0x01B6: ch = 0x7A; break;
312 case 0x01CD: ch = 0x41; break;
313 case 0x01CE: ch = 0x61; break;
314 case 0x01CF: ch = 0x49; break;
315 case 0x01D0: ch = 0x69; break;
316 case 0x01D1: ch = 0x4F; break;
317 case 0x01D2: ch = 0x6F; break;
318 case 0x01D3: ch = 0x55; break;
319 case 0x01D4: ch = 0x75; break;
320 case 0x01D5: ch = 0x55; break;
321 case 0x01D6: ch = 0x75; break;
322 case 0x01D7: ch = 0x55; break;
323 case 0x01D8: ch = 0x75; break;
324 case 0x01D9: ch = 0x55; break;
325 case 0x01DA: ch = 0x75; break;
326 case 0x01DB: ch = 0x55; break;
327 case 0x01DC: ch = 0x75; break;
328 case 0x01DE: ch = 0x41; break;
329 case 0x01DF: ch = 0x61; break;
330 case 0x01E4: ch = 0x47; break;
331 case 0x01E5: ch = 0x67; break;
332 case 0x01E6: ch = 0x47; break;
333 case 0x01E7: ch = 0x67; break;
334 case 0x01E8: ch = 0x4B; break;
335 case 0x01E9: ch = 0x6B; break;
336 case 0x01EA: ch = 0x4F; break;
337 case 0x01EB: ch = 0x6F; break;
338 case 0x01EC: ch = 0x4F; break;
339 case 0x01ED: ch = 0x6F; break;
340 case 0x01F0: ch = 0x6A; break;
341 case 0x0261: ch = 0x67; break;
342 case 0x02B9: ch = 0x27; break;
343 case 0x02BA: ch = 0x22; break;
344 case 0x02BC: ch = 0x27; break;
345 case 0x02C4: ch = 0x5E; break;
346 case 0x02C6: ch = 0x5E; break;
347 case 0x02C8: ch = 0x27; break;
348 case 0x02CB: ch = 0x60; break;
349 case 0x02CD: ch = 0x5F; break;
350 case 0x02DC: ch = 0x7E; break;
351 case 0x0300: ch = 0x60; break;
352 case 0x0302: ch = 0x5E; break;
353 case 0x0303: ch = 0x7E; break;
354 case 0x030E: ch = 0x22; break;
355 case 0x0331: ch = 0x5F; break;
356 case 0x0332: ch = 0x5F; break;
357 case 0x060C: ch = 0xAC; break;
358 case 0x061B: ch = 0xBB; break;
359 case 0x061F: ch = 0xBF; break;
360 case 0x0621:
361 case 0x0622:
362 case 0x0623:
363 case 0x0624:
364 case 0x0625:
365 case 0x0626:
366 case 0x0627:
367 case 0x0628:
368 case 0x0629:
369 case 0x062A:
370 case 0x062B:
371 case 0x062C:
372 case 0x062D:
373 case 0x062E:
374 case 0x062F:
375 case 0x0630:
376 case 0x0631:
377 case 0x0632:
378 case 0x0633:
379 case 0x0634:
380 case 0x0635:
381 case 0x0636:
382 case 0x0637:
383 case 0x0638:
384 case 0x0639:
385 case 0x063A:
386 ch -= 0x0560;
387 break;
388 case 0x0640:
389 case 0x0641:
390 case 0x0642:
391 case 0x0643:
392 case 0x0644:
393 case 0x0645:
394 case 0x0646:
395 case 0x0647:
396 case 0x0648:
397 case 0x0649:
398 case 0x064A:
399 case 0x064B:
400 case 0x064C:
401 case 0x064D:
402 case 0x064E:
403 case 0x064F:
404 case 0x0650:
405 case 0x0651:
406 case 0x0652:
407 ch -= 0x0560;
408 break;
409 case 0x2000: ch = 0x20; break;
410 case 0x2001: ch = 0x20; break;
411 case 0x2002: ch = 0x20; break;
412 case 0x2003: ch = 0x20; break;
413 case 0x2004: ch = 0x20; break;
414 case 0x2005: ch = 0x20; break;
415 case 0x2006: ch = 0x20; break;
416 case 0x2010: ch = 0x2D; break;
417 case 0x2011: ch = 0x2D; break;
418 case 0x2013: ch = 0x2D; break;
419 case 0x2014: ch = 0x2D; break;
420 case 0x2018: ch = 0x27; break;
421 case 0x2019: ch = 0x27; break;
422 case 0x201A: ch = 0x2C; break;
423 case 0x201C: ch = 0x22; break;
424 case 0x201D: ch = 0x22; break;
425 case 0x201E: ch = 0x22; break;
426 case 0x2022: ch = 0x2E; break;
427 case 0x2026: ch = 0x2E; break;
428 case 0x2032: ch = 0x27; break;
429 case 0x2035: ch = 0x60; break;
430 case 0x2039: ch = 0x3C; break;
431 case 0x203A: ch = 0x3E; break;
432 case 0x2122: ch = 0x54; break;
433 case 0xF7C8: ch = 0xA1; break;
434 case 0xF7C9: ch = 0xA2; break;
435 case 0xF7CA: ch = 0xA3; break;
436 case 0xF7CB:
437 case 0xF7CC:
438 case 0xF7CD:
439 case 0xF7CE:
440 case 0xF7CF:
441 case 0xF7D0:
442 case 0xF7D1:
443 ch -= 0xF726;
444 break;
445 case 0xF7D2:
446 case 0xF7D3:
447 case 0xF7D4:
448 case 0xF7D5:
449 case 0xF7D6:
450 case 0xF7D7:
451 case 0xF7D8:
452 case 0xF7D9:
453 case 0xF7DA:
454 case 0xF7DB:
455 case 0xF7DC:
456 case 0xF7DD:
457 case 0xF7DE:
458 ch -= 0xF724;
459 break;
460 case 0xF7DF: ch = 0xBC; break;
461 case 0xF7E0: ch = 0xBD; break;
462 case 0xF7E1: ch = 0xBE; break;
463 case 0xF7E2: ch = 0xC0; break;
464 case 0xF7E3:
465 case 0xF7E4:
466 case 0xF7E5:
467 case 0xF7E6:
468 case 0xF7E7:
469 ch -= 0xF708;
470 break;
471 case 0xF7E8:
472 case 0xF7E9:
473 case 0xF7EA:
474 case 0xF7EB:
475 case 0xF7EC:
476 case 0xF7ED:
477 case 0xF7EE:
478 case 0xF7EF:
479 case 0xF7F0:
480 case 0xF7F1:
481 case 0xF7F2:
482 case 0xF7F3:
483 case 0xF7F4:
484 ch -= 0xF6F5;
485 break;
486 case 0xFF01:
487 case 0xFF02:
488 case 0xFF03:
489 case 0xFF04:
490 case 0xFF05:
491 case 0xFF06:
492 case 0xFF07:
493 case 0xFF08:
494 case 0xFF09:
495 case 0xFF0A:
496 case 0xFF0B:
497 case 0xFF0C:
498 case 0xFF0D:
499 case 0xFF0E:
500 case 0xFF0F:
501 case 0xFF10:
502 case 0xFF11:
503 case 0xFF12:
504 case 0xFF13:
505 case 0xFF14:
506 case 0xFF15:
507 case 0xFF16:
508 case 0xFF17:
509 case 0xFF18:
510 case 0xFF19:
511 case 0xFF1A:
512 case 0xFF1B:
513 case 0xFF1C:
514 case 0xFF1D:
515 case 0xFF1E:
516 ch -= 0xFEE0;
517 break;
518 case 0xFF20:
519 case 0xFF21:
520 case 0xFF22:
521 case 0xFF23:
522 case 0xFF24:
523 case 0xFF25:
524 case 0xFF26:
525 case 0xFF27:
526 case 0xFF28:
527 case 0xFF29:
528 case 0xFF2A:
529 case 0xFF2B:
530 case 0xFF2C:
531 case 0xFF2D:
532 case 0xFF2E:
533 case 0xFF2F:
534 case 0xFF30:
535 case 0xFF31:
536 case 0xFF32:
537 case 0xFF33:
538 case 0xFF34:
539 case 0xFF35:
540 case 0xFF36:
541 case 0xFF37:
542 case 0xFF38:
543 case 0xFF39:
544 case 0xFF3A:
545 case 0xFF3B:
546 case 0xFF3C:
547 case 0xFF3D:
548 case 0xFF3E:
549 case 0xFF3F:
550 case 0xFF40:
551 case 0xFF41:
552 case 0xFF42:
553 case 0xFF43:
554 case 0xFF44:
555 case 0xFF45:
556 case 0xFF46:
557 case 0xFF47:
558 case 0xFF48:
559 case 0xFF49:
560 case 0xFF4A:
561 case 0xFF4B:
562 case 0xFF4C:
563 case 0xFF4D:
564 case 0xFF4E:
565 case 0xFF4F:
566 case 0xFF50:
567 case 0xFF51:
568 case 0xFF52:
569 case 0xFF53:
570 case 0xFF54:
571 case 0xFF55:
572 case 0xFF56:
573 case 0xFF57:
574 case 0xFF58:
575 case 0xFF59:
576 case 0xFF5A:
577 case 0xFF5B:
578 case 0xFF5C:
579 case 0xFF5D:
580 case 0xFF5E:
581 ch -= 0xFEE0;
582 break;
583 default:
584 #if NET_2_0
585 HandleFallback (ref buffer, chars, ref charIndex, ref charCount, bytes, ref byteIndex, ref byteCount);
586 #else
587 ch = 0x3F;
588 #endif
589 break;
591 bytes[byteIndex++] = (byte)ch;
592 --charCount;
593 --byteCount;
598 protected override void ToBytes(String s, int charIndex, int charCount,
599 byte[] bytes, int byteIndex)
601 int ch;
602 while(charCount > 0)
604 ch = (int)(s[charIndex++]);
605 if(ch >= 161) switch(ch)
607 case 0x00A4:
608 case 0x00AD:
609 break;
610 case 0x00A1: ch = 0x21; break;
611 case 0x00A2: ch = 0x63; break;
612 case 0x00A5: ch = 0x59; break;
613 case 0x00A6: ch = 0x7C; break;
614 case 0x00A9: ch = 0x43; break;
615 case 0x00AA: ch = 0x61; break;
616 case 0x00AB: ch = 0x3C; break;
617 case 0x00AE: ch = 0x52; break;
618 case 0x00B2: ch = 0x32; break;
619 case 0x00B3: ch = 0x33; break;
620 case 0x00B7: ch = 0x2E; break;
621 case 0x00B8: ch = 0x2C; break;
622 case 0x00B9: ch = 0x31; break;
623 case 0x00BA: ch = 0x6F; break;
624 case 0x00BB: ch = 0x3E; break;
625 case 0x00C0: ch = 0x41; break;
626 case 0x00C1: ch = 0x41; break;
627 case 0x00C2: ch = 0x41; break;
628 case 0x00C3: ch = 0x41; break;
629 case 0x00C4: ch = 0x41; break;
630 case 0x00C5: ch = 0x41; break;
631 case 0x00C6: ch = 0x41; break;
632 case 0x00C7: ch = 0x43; break;
633 case 0x00C8: ch = 0x45; break;
634 case 0x00C9: ch = 0x45; break;
635 case 0x00CA: ch = 0x45; break;
636 case 0x00CB: ch = 0x45; break;
637 case 0x00CC: ch = 0x49; break;
638 case 0x00CD: ch = 0x49; break;
639 case 0x00CE: ch = 0x49; break;
640 case 0x00CF: ch = 0x49; break;
641 case 0x00D0: ch = 0x44; break;
642 case 0x00D1: ch = 0x4E; break;
643 case 0x00D2: ch = 0x4F; break;
644 case 0x00D3: ch = 0x4F; break;
645 case 0x00D4: ch = 0x4F; break;
646 case 0x00D5: ch = 0x4F; break;
647 case 0x00D6: ch = 0x4F; break;
648 case 0x00D8: ch = 0x4F; break;
649 case 0x00D9: ch = 0x55; break;
650 case 0x00DA: ch = 0x55; break;
651 case 0x00DB: ch = 0x55; break;
652 case 0x00DC: ch = 0x55; break;
653 case 0x00DD: ch = 0x59; break;
654 case 0x00E0: ch = 0x61; break;
655 case 0x00E1: ch = 0x61; break;
656 case 0x00E2: ch = 0x61; break;
657 case 0x00E3: ch = 0x61; break;
658 case 0x00E4: ch = 0x61; break;
659 case 0x00E5: ch = 0x61; break;
660 case 0x00E6: ch = 0x61; break;
661 case 0x00E7: ch = 0x63; break;
662 case 0x00E8: ch = 0x65; break;
663 case 0x00E9: ch = 0x65; break;
664 case 0x00EA: ch = 0x65; break;
665 case 0x00EB: ch = 0x65; break;
666 case 0x00EC: ch = 0x69; break;
667 case 0x00ED: ch = 0x69; break;
668 case 0x00EE: ch = 0x69; break;
669 case 0x00EF: ch = 0x69; break;
670 case 0x00F1: ch = 0x6E; break;
671 case 0x00F2: ch = 0x6F; break;
672 case 0x00F3: ch = 0x6F; break;
673 case 0x00F4: ch = 0x6F; break;
674 case 0x00F5: ch = 0x6F; break;
675 case 0x00F6: ch = 0x6F; break;
676 case 0x00F8: ch = 0x6F; break;
677 case 0x00F9: ch = 0x75; break;
678 case 0x00FA: ch = 0x75; break;
679 case 0x00FB: ch = 0x75; break;
680 case 0x00FC: ch = 0x75; break;
681 case 0x00FD: ch = 0x79; break;
682 case 0x00FF: ch = 0x79; break;
683 case 0x0100: ch = 0x41; break;
684 case 0x0101: ch = 0x61; break;
685 case 0x0102: ch = 0x41; break;
686 case 0x0103: ch = 0x61; break;
687 case 0x0104: ch = 0x41; break;
688 case 0x0105: ch = 0x61; break;
689 case 0x0106: ch = 0x43; break;
690 case 0x0107: ch = 0x63; break;
691 case 0x0108: ch = 0x43; break;
692 case 0x0109: ch = 0x63; break;
693 case 0x010A: ch = 0x43; break;
694 case 0x010B: ch = 0x63; break;
695 case 0x010C: ch = 0x43; break;
696 case 0x010D: ch = 0x63; break;
697 case 0x010E: ch = 0x44; break;
698 case 0x010F: ch = 0x64; break;
699 case 0x0110: ch = 0x44; break;
700 case 0x0111: ch = 0x64; break;
701 case 0x0112: ch = 0x45; break;
702 case 0x0113: ch = 0x65; break;
703 case 0x0114: ch = 0x45; break;
704 case 0x0115: ch = 0x65; break;
705 case 0x0116: ch = 0x45; break;
706 case 0x0117: ch = 0x65; break;
707 case 0x0118: ch = 0x45; break;
708 case 0x0119: ch = 0x65; break;
709 case 0x011A: ch = 0x45; break;
710 case 0x011B: ch = 0x65; break;
711 case 0x011C: ch = 0x47; break;
712 case 0x011D: ch = 0x67; break;
713 case 0x011E: ch = 0x47; break;
714 case 0x011F: ch = 0x67; break;
715 case 0x0120: ch = 0x47; break;
716 case 0x0121: ch = 0x67; break;
717 case 0x0122: ch = 0x47; break;
718 case 0x0123: ch = 0x67; break;
719 case 0x0124: ch = 0x48; break;
720 case 0x0125: ch = 0x68; break;
721 case 0x0126: ch = 0x48; break;
722 case 0x0127: ch = 0x68; break;
723 case 0x0128: ch = 0x49; break;
724 case 0x0129: ch = 0x69; break;
725 case 0x012A: ch = 0x49; break;
726 case 0x012B: ch = 0x69; break;
727 case 0x012C: ch = 0x49; break;
728 case 0x012D: ch = 0x69; break;
729 case 0x012E: ch = 0x49; break;
730 case 0x012F: ch = 0x69; break;
731 case 0x0130: ch = 0x49; break;
732 case 0x0131: ch = 0x69; break;
733 case 0x0134: ch = 0x4A; break;
734 case 0x0135: ch = 0x6A; break;
735 case 0x0136: ch = 0x4B; break;
736 case 0x0137: ch = 0x6B; break;
737 case 0x0139: ch = 0x4C; break;
738 case 0x013A: ch = 0x6C; break;
739 case 0x013B: ch = 0x4C; break;
740 case 0x013C: ch = 0x6C; break;
741 case 0x013D: ch = 0x4C; break;
742 case 0x013E: ch = 0x6C; break;
743 case 0x0141: ch = 0x4C; break;
744 case 0x0142: ch = 0x6C; break;
745 case 0x0143: ch = 0x4E; break;
746 case 0x0144: ch = 0x6E; break;
747 case 0x0145: ch = 0x4E; break;
748 case 0x0146: ch = 0x6E; break;
749 case 0x0147: ch = 0x4E; break;
750 case 0x0148: ch = 0x6E; break;
751 case 0x014C: ch = 0x4F; break;
752 case 0x014D: ch = 0x6F; break;
753 case 0x014E: ch = 0x4F; break;
754 case 0x014F: ch = 0x6F; break;
755 case 0x0150: ch = 0x4F; break;
756 case 0x0151: ch = 0x6F; break;
757 case 0x0152: ch = 0x4F; break;
758 case 0x0153: ch = 0x6F; break;
759 case 0x0154: ch = 0x52; break;
760 case 0x0155: ch = 0x72; break;
761 case 0x0156: ch = 0x52; break;
762 case 0x0157: ch = 0x72; break;
763 case 0x0158: ch = 0x52; break;
764 case 0x0159: ch = 0x72; break;
765 case 0x015A: ch = 0x53; break;
766 case 0x015B: ch = 0x73; break;
767 case 0x015C: ch = 0x53; break;
768 case 0x015D: ch = 0x73; break;
769 case 0x015E: ch = 0x53; break;
770 case 0x015F: ch = 0x73; break;
771 case 0x0160: ch = 0x53; break;
772 case 0x0161: ch = 0x73; break;
773 case 0x0162: ch = 0x54; break;
774 case 0x0163: ch = 0x74; break;
775 case 0x0164: ch = 0x54; break;
776 case 0x0165: ch = 0x74; break;
777 case 0x0166: ch = 0x54; break;
778 case 0x0167: ch = 0x74; break;
779 case 0x0168: ch = 0x55; break;
780 case 0x0169: ch = 0x75; break;
781 case 0x016A: ch = 0x55; break;
782 case 0x016B: ch = 0x75; break;
783 case 0x016C: ch = 0x55; break;
784 case 0x016D: ch = 0x75; break;
785 case 0x016E: ch = 0x55; break;
786 case 0x016F: ch = 0x75; break;
787 case 0x0170: ch = 0x55; break;
788 case 0x0171: ch = 0x75; break;
789 case 0x0172: ch = 0x55; break;
790 case 0x0173: ch = 0x75; break;
791 case 0x0174: ch = 0x57; break;
792 case 0x0175: ch = 0x77; break;
793 case 0x0176: ch = 0x59; break;
794 case 0x0177: ch = 0x79; break;
795 case 0x0178: ch = 0x59; break;
796 case 0x0179: ch = 0x5A; break;
797 case 0x017A: ch = 0x7A; break;
798 case 0x017B: ch = 0x5A; break;
799 case 0x017C: ch = 0x7A; break;
800 case 0x017D: ch = 0x5A; break;
801 case 0x017E: ch = 0x7A; break;
802 case 0x0180: ch = 0x62; break;
803 case 0x0189: ch = 0x44; break;
804 case 0x0191: ch = 0x46; break;
805 case 0x0192: ch = 0x66; break;
806 case 0x0197: ch = 0x49; break;
807 case 0x019A: ch = 0x6C; break;
808 case 0x019F: ch = 0x4F; break;
809 case 0x01A0: ch = 0x4F; break;
810 case 0x01A1: ch = 0x6F; break;
811 case 0x01AB: ch = 0x74; break;
812 case 0x01AE: ch = 0x54; break;
813 case 0x01AF: ch = 0x55; break;
814 case 0x01B0: ch = 0x75; break;
815 case 0x01B6: ch = 0x7A; break;
816 case 0x01CD: ch = 0x41; break;
817 case 0x01CE: ch = 0x61; break;
818 case 0x01CF: ch = 0x49; break;
819 case 0x01D0: ch = 0x69; break;
820 case 0x01D1: ch = 0x4F; break;
821 case 0x01D2: ch = 0x6F; break;
822 case 0x01D3: ch = 0x55; break;
823 case 0x01D4: ch = 0x75; break;
824 case 0x01D5: ch = 0x55; break;
825 case 0x01D6: ch = 0x75; break;
826 case 0x01D7: ch = 0x55; break;
827 case 0x01D8: ch = 0x75; break;
828 case 0x01D9: ch = 0x55; break;
829 case 0x01DA: ch = 0x75; break;
830 case 0x01DB: ch = 0x55; break;
831 case 0x01DC: ch = 0x75; break;
832 case 0x01DE: ch = 0x41; break;
833 case 0x01DF: ch = 0x61; break;
834 case 0x01E4: ch = 0x47; break;
835 case 0x01E5: ch = 0x67; break;
836 case 0x01E6: ch = 0x47; break;
837 case 0x01E7: ch = 0x67; break;
838 case 0x01E8: ch = 0x4B; break;
839 case 0x01E9: ch = 0x6B; break;
840 case 0x01EA: ch = 0x4F; break;
841 case 0x01EB: ch = 0x6F; break;
842 case 0x01EC: ch = 0x4F; break;
843 case 0x01ED: ch = 0x6F; break;
844 case 0x01F0: ch = 0x6A; break;
845 case 0x0261: ch = 0x67; break;
846 case 0x02B9: ch = 0x27; break;
847 case 0x02BA: ch = 0x22; break;
848 case 0x02BC: ch = 0x27; break;
849 case 0x02C4: ch = 0x5E; break;
850 case 0x02C6: ch = 0x5E; break;
851 case 0x02C8: ch = 0x27; break;
852 case 0x02CB: ch = 0x60; break;
853 case 0x02CD: ch = 0x5F; break;
854 case 0x02DC: ch = 0x7E; break;
855 case 0x0300: ch = 0x60; break;
856 case 0x0302: ch = 0x5E; break;
857 case 0x0303: ch = 0x7E; break;
858 case 0x030E: ch = 0x22; break;
859 case 0x0331: ch = 0x5F; break;
860 case 0x0332: ch = 0x5F; break;
861 case 0x060C: ch = 0xAC; break;
862 case 0x061B: ch = 0xBB; break;
863 case 0x061F: ch = 0xBF; break;
864 case 0x0621:
865 case 0x0622:
866 case 0x0623:
867 case 0x0624:
868 case 0x0625:
869 case 0x0626:
870 case 0x0627:
871 case 0x0628:
872 case 0x0629:
873 case 0x062A:
874 case 0x062B:
875 case 0x062C:
876 case 0x062D:
877 case 0x062E:
878 case 0x062F:
879 case 0x0630:
880 case 0x0631:
881 case 0x0632:
882 case 0x0633:
883 case 0x0634:
884 case 0x0635:
885 case 0x0636:
886 case 0x0637:
887 case 0x0638:
888 case 0x0639:
889 case 0x063A:
890 ch -= 0x0560;
891 break;
892 case 0x0640:
893 case 0x0641:
894 case 0x0642:
895 case 0x0643:
896 case 0x0644:
897 case 0x0645:
898 case 0x0646:
899 case 0x0647:
900 case 0x0648:
901 case 0x0649:
902 case 0x064A:
903 case 0x064B:
904 case 0x064C:
905 case 0x064D:
906 case 0x064E:
907 case 0x064F:
908 case 0x0650:
909 case 0x0651:
910 case 0x0652:
911 ch -= 0x0560;
912 break;
913 case 0x2000: ch = 0x20; break;
914 case 0x2001: ch = 0x20; break;
915 case 0x2002: ch = 0x20; break;
916 case 0x2003: ch = 0x20; break;
917 case 0x2004: ch = 0x20; break;
918 case 0x2005: ch = 0x20; break;
919 case 0x2006: ch = 0x20; break;
920 case 0x2010: ch = 0x2D; break;
921 case 0x2011: ch = 0x2D; break;
922 case 0x2013: ch = 0x2D; break;
923 case 0x2014: ch = 0x2D; break;
924 case 0x2018: ch = 0x27; break;
925 case 0x2019: ch = 0x27; break;
926 case 0x201A: ch = 0x2C; break;
927 case 0x201C: ch = 0x22; break;
928 case 0x201D: ch = 0x22; break;
929 case 0x201E: ch = 0x22; break;
930 case 0x2022: ch = 0x2E; break;
931 case 0x2026: ch = 0x2E; break;
932 case 0x2032: ch = 0x27; break;
933 case 0x2035: ch = 0x60; break;
934 case 0x2039: ch = 0x3C; break;
935 case 0x203A: ch = 0x3E; break;
936 case 0x2122: ch = 0x54; break;
937 case 0xF7C8: ch = 0xA1; break;
938 case 0xF7C9: ch = 0xA2; break;
939 case 0xF7CA: ch = 0xA3; break;
940 case 0xF7CB:
941 case 0xF7CC:
942 case 0xF7CD:
943 case 0xF7CE:
944 case 0xF7CF:
945 case 0xF7D0:
946 case 0xF7D1:
947 ch -= 0xF726;
948 break;
949 case 0xF7D2:
950 case 0xF7D3:
951 case 0xF7D4:
952 case 0xF7D5:
953 case 0xF7D6:
954 case 0xF7D7:
955 case 0xF7D8:
956 case 0xF7D9:
957 case 0xF7DA:
958 case 0xF7DB:
959 case 0xF7DC:
960 case 0xF7DD:
961 case 0xF7DE:
962 ch -= 0xF724;
963 break;
964 case 0xF7DF: ch = 0xBC; break;
965 case 0xF7E0: ch = 0xBD; break;
966 case 0xF7E1: ch = 0xBE; break;
967 case 0xF7E2: ch = 0xC0; break;
968 case 0xF7E3:
969 case 0xF7E4:
970 case 0xF7E5:
971 case 0xF7E6:
972 case 0xF7E7:
973 ch -= 0xF708;
974 break;
975 case 0xF7E8:
976 case 0xF7E9:
977 case 0xF7EA:
978 case 0xF7EB:
979 case 0xF7EC:
980 case 0xF7ED:
981 case 0xF7EE:
982 case 0xF7EF:
983 case 0xF7F0:
984 case 0xF7F1:
985 case 0xF7F2:
986 case 0xF7F3:
987 case 0xF7F4:
988 ch -= 0xF6F5;
989 break;
990 case 0xFF01:
991 case 0xFF02:
992 case 0xFF03:
993 case 0xFF04:
994 case 0xFF05:
995 case 0xFF06:
996 case 0xFF07:
997 case 0xFF08:
998 case 0xFF09:
999 case 0xFF0A:
1000 case 0xFF0B:
1001 case 0xFF0C:
1002 case 0xFF0D:
1003 case 0xFF0E:
1004 case 0xFF0F:
1005 case 0xFF10:
1006 case 0xFF11:
1007 case 0xFF12:
1008 case 0xFF13:
1009 case 0xFF14:
1010 case 0xFF15:
1011 case 0xFF16:
1012 case 0xFF17:
1013 case 0xFF18:
1014 case 0xFF19:
1015 case 0xFF1A:
1016 case 0xFF1B:
1017 case 0xFF1C:
1018 case 0xFF1D:
1019 case 0xFF1E:
1020 ch -= 0xFEE0;
1021 break;
1022 case 0xFF20:
1023 case 0xFF21:
1024 case 0xFF22:
1025 case 0xFF23:
1026 case 0xFF24:
1027 case 0xFF25:
1028 case 0xFF26:
1029 case 0xFF27:
1030 case 0xFF28:
1031 case 0xFF29:
1032 case 0xFF2A:
1033 case 0xFF2B:
1034 case 0xFF2C:
1035 case 0xFF2D:
1036 case 0xFF2E:
1037 case 0xFF2F:
1038 case 0xFF30:
1039 case 0xFF31:
1040 case 0xFF32:
1041 case 0xFF33:
1042 case 0xFF34:
1043 case 0xFF35:
1044 case 0xFF36:
1045 case 0xFF37:
1046 case 0xFF38:
1047 case 0xFF39:
1048 case 0xFF3A:
1049 case 0xFF3B:
1050 case 0xFF3C:
1051 case 0xFF3D:
1052 case 0xFF3E:
1053 case 0xFF3F:
1054 case 0xFF40:
1055 case 0xFF41:
1056 case 0xFF42:
1057 case 0xFF43:
1058 case 0xFF44:
1059 case 0xFF45:
1060 case 0xFF46:
1061 case 0xFF47:
1062 case 0xFF48:
1063 case 0xFF49:
1064 case 0xFF4A:
1065 case 0xFF4B:
1066 case 0xFF4C:
1067 case 0xFF4D:
1068 case 0xFF4E:
1069 case 0xFF4F:
1070 case 0xFF50:
1071 case 0xFF51:
1072 case 0xFF52:
1073 case 0xFF53:
1074 case 0xFF54:
1075 case 0xFF55:
1076 case 0xFF56:
1077 case 0xFF57:
1078 case 0xFF58:
1079 case 0xFF59:
1080 case 0xFF5A:
1081 case 0xFF5B:
1082 case 0xFF5C:
1083 case 0xFF5D:
1084 case 0xFF5E:
1085 ch -= 0xFEE0;
1086 break;
1087 default: ch = 0x3F; break;
1089 bytes[byteIndex++] = (byte)ch;
1090 --charCount;
1095 }; // class CP28596
1097 [Serializable]
1098 public class ENCiso_8859_6 : CP28596
1100 public ENCiso_8859_6() : base() {}
1102 }; // class ENCiso_8859_6
1104 }; // namespace I18N.MidEast