Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

codes.c

Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 /* $Id$ */
00019 #ifdef HAVE_CONFIG_H
00020 #include "config.h"
00021 #endif
00022 
00023 #include "codes.h"
00024 
00025 typedef struct {
00026     unsigned int index;
00027     unsigned int val;
00028 } unicode_entry;
00029 
00030 
00031 unicode_entry unicode_data[]={
00032 /*   char            char            char            char            char    */
00033 { 0x0081, 0x81 }, { 0x0081, 0x81 }, { 0x008d, 0x8d }, { 0x008d, 0x8d }, { 0x008f, 0x8f },
00034 /*   char            char            char            char            char    */
00035 { 0x008f, 0x8f }, { 0x0090, 0x90 }, { 0x0090, 0x90 }, { 0x009d, 0x9d }, { 0x009d, 0x9d },
00036 /*   char            char            char            char            char    */
00037 { 0x00a0, 0xa0 }, { 0x00a0, 0xa0 }, { 0x00a1, 0xa1 }, { 0x00a1, 0xa1 }, { 0x00a2, 0xa2 },
00038 /*   char            char            char            char            char    */
00039 { 0x00a2, 0xa2 }, { 0x00a3, 0xa3 }, { 0x00a3, 0xa3 }, { 0x00a4, 0xa4 }, { 0x00a4, 0xa4 },
00040 /*   char            char            char            char            char    */
00041 { 0x00a5, 0xa5 }, { 0x00a5, 0xa5 }, { 0x00a6, 0xa6 }, { 0x00a6, 0xa6 }, { 0x00a7, 0xa7 },
00042 /*   char            char            char            char            char    */
00043 { 0x00a7, 0xa7 }, { 0x00a8, 0xa8 }, { 0x00a8, 0xa8 }, { 0x00a9, 0xa9 }, { 0x00a9, 0xa9 },
00044 /*   char            char            char            char            char    */
00045 { 0x00aa, 0xaa }, { 0x00aa, 0xaa }, { 0x00ab, 0xab }, { 0x00ab, 0xab }, { 0x00ac, 0xac },
00046 /*   char            char            char            char            char    */
00047 { 0x00ac, 0xac }, { 0x00ad, 0xad }, { 0x00ad, 0xad }, { 0x00ae, 0xae }, { 0x00ae, 0xae },
00048 /*   char            char            char            char            char    */
00049 { 0x00af, 0xaf }, { 0x00af, 0xaf }, { 0x00b0, 0xb0 }, { 0x00b0, 0xb0 }, { 0x00b1, 0xb1 },
00050 /*   char            char            char            char            char    */
00051 { 0x00b1, 0xb1 }, { 0x00b2, 0xb2 }, { 0x00b2, 0xb2 }, { 0x00b3, 0xb3 }, { 0x00b3, 0xb3 },
00052 /*   char            char            char            char            char    */
00053 { 0x00b4, 0xb4 }, { 0x00b4, 0xb4 }, { 0x00b5, 0xb5 }, { 0x00b5, 0xb5 }, { 0x00b6, 0xb6 },
00054 /*   char            char            char            char            char    */
00055 { 0x00b6, 0xb6 }, { 0x00b7, 0xb7 }, { 0x00b7, 0xb7 }, { 0x00b8, 0xb8 }, { 0x00b8, 0xb8 },
00056 /*   char            char            char            char            char    */
00057 { 0x00b9, 0xb9 }, { 0x00b9, 0xb9 }, { 0x00ba, 0xba }, { 0x00ba, 0xba }, { 0x00bb, 0xbb },
00058 /*   char            char            char            char            char    */
00059 { 0x00bb, 0xbb }, { 0x00bc, 0xbc }, { 0x00bc, 0xbc }, { 0x00bd, 0xbd }, { 0x00bd, 0xbd },
00060 /*   char            char            char            char            char    */
00061 { 0x00be, 0xbe }, { 0x00be, 0xbe }, { 0x00bf, 0xbf }, { 0x00bf, 0xbf }, { 0x00c0, 0xc0 },
00062 /*   char            char            char            char            char    */
00063 { 0x00c0, 0xc0 }, { 0x00c1, 0xc1 }, { 0x00c1, 0xc1 }, { 0x00c2, 0xc2 }, { 0x00c2, 0xc2 },
00064 /*   char            char            char            char            char    */
00065 { 0x00c3, 0xc3 }, { 0x00c3, 0xc3 }, { 0x00c4, 0xc4 }, { 0x00c4, 0xc4 }, { 0x00c5, 0xc5 },
00066 /*   char            char            char            char            char    */
00067 { 0x00c5, 0xc5 }, { 0x00c6, 0xc6 }, { 0x00c6, 0xc6 }, { 0x00c7, 0xc7 }, { 0x00c7, 0xc7 },
00068 /*   char            char            char            char            char    */
00069 { 0x00c8, 0xc8 }, { 0x00c8, 0xc8 }, { 0x00c9, 0xc9 }, { 0x00c9, 0xc9 }, { 0x00ca, 0xca },
00070 /*   char            char            char            char            char    */
00071 { 0x00ca, 0xca }, { 0x00cb, 0xcb }, { 0x00cb, 0xcb }, { 0x00cc, 0xcc }, { 0x00cc, 0xcc },
00072 /*   char            char            char            char            char    */
00073 { 0x00cd, 0xcd }, { 0x00cd, 0xcd }, { 0x00ce, 0xce }, { 0x00ce, 0xce }, { 0x00cf, 0xcf },
00074 /*   char            char            char            char            char    */
00075 { 0x00cf, 0xcf }, { 0x00d0, 0xd0 }, { 0x00d0, 0xd0 }, { 0x00d1, 0xd1 }, { 0x00d1, 0xd1 },
00076 /*   char            char            char            char            char    */
00077 { 0x00d2, 0xd2 }, { 0x00d2, 0xd2 }, { 0x00d3, 0xd3 }, { 0x00d3, 0xd3 }, { 0x00d4, 0xd4 },
00078 /*   char            char            char            char            char    */
00079 { 0x00d4, 0xd4 }, { 0x00d5, 0xd5 }, { 0x00d5, 0xd5 }, { 0x00d6, 0xd6 }, { 0x00d6, 0xd6 },
00080 /*   char            char            char            char            char    */
00081 { 0x00d7, 0xd7 }, { 0x00d7, 0xd7 }, { 0x00d8, 0xd8 }, { 0x00d8, 0xd8 }, { 0x00d9, 0xd9 },
00082 /*   char            char            char            char            char    */
00083 { 0x00d9, 0xd9 }, { 0x00da, 0xda }, { 0x00da, 0xda }, { 0x00db, 0xdb }, { 0x00db, 0xdb },
00084 /*   char            char            char            char            char    */
00085 { 0x00dc, 0xdc }, { 0x00dc, 0xdc }, { 0x00dd, 0xdd }, { 0x00dd, 0xdd }, { 0x00de, 0xde },
00086 /*   char            char            char            char            char    */
00087 { 0x00de, 0xde }, { 0x00df, 0xdf }, { 0x00df, 0xdf }, { 0x00e0, 0xe0 }, { 0x00e0, 0xe0 },
00088 /*   char            char            char            char            char    */
00089 { 0x00e1, 0xe1 }, { 0x00e1, 0xe1 }, { 0x00e2, 0xe2 }, { 0x00e2, 0xe2 }, { 0x00e3, 0xe3 },
00090 /*   char            char            char            char            char    */
00091 { 0x00e3, 0xe3 }, { 0x00e4, 0xe4 }, { 0x00e4, 0xe4 }, { 0x00e5, 0xe5 }, { 0x00e5, 0xe5 },
00092 /*   char            char            char            char            char    */
00093 { 0x00e6, 0xe6 }, { 0x00e6, 0xe6 }, { 0x00e7, 0xe7 }, { 0x00e7, 0xe7 }, { 0x00e8, 0xe8 },
00094 /*   char            char            char            char            char    */
00095 { 0x00e8, 0xe8 }, { 0x00e9, 0xe9 }, { 0x00e9, 0xe9 }, { 0x00ea, 0xea }, { 0x00ea, 0xea },
00096 /*   char            char            char            char            char    */
00097 { 0x00eb, 0xeb }, { 0x00eb, 0xeb }, { 0x00ec, 0xec }, { 0x00ec, 0xec }, { 0x00ed, 0xed },
00098 /*   char            char            char            char            char    */
00099 { 0x00ed, 0xed }, { 0x00ee, 0xee }, { 0x00ee, 0xee }, { 0x00ef, 0xef }, { 0x00ef, 0xef },
00100 /*   char            char            char            char            char    */
00101 { 0x00f0, 0xf0 }, { 0x00f0, 0xf0 }, { 0x00f1, 0xf1 }, { 0x00f1, 0xf1 }, { 0x00f2, 0xf2 },
00102 /*   char            char            char            char            char    */
00103 { 0x00f2, 0xf2 }, { 0x00f3, 0xf3 }, { 0x00f3, 0xf3 }, { 0x00f4, 0xf4 }, { 0x00f4, 0xf4 },
00104 /*   char            char            char            char            char    */
00105 { 0x00f5, 0xf5 }, { 0x00f5, 0xf5 }, { 0x00f6, 0xf6 }, { 0x00f6, 0xf6 }, { 0x00f7, 0xf7 },
00106 /*   char            char            char            char            char    */
00107 { 0x00f7, 0xf7 }, { 0x00f8, 0xf8 }, { 0x00f8, 0xf8 }, { 0x00f9, 0xf9 }, { 0x00f9, 0xf9 },
00108 /*   char            char            char            char            char    */
00109 { 0x00fa, 0xfa }, { 0x00fa, 0xfa }, { 0x00fb, 0xfb }, { 0x00fb, 0xfb }, { 0x00fc, 0xfc },
00110 /*   char            char            char            char            char    */
00111 { 0x00fc, 0xfc }, { 0x00fd, 0xfd }, { 0x00fd, 0xfd }, { 0x00fe, 0xfe }, { 0x00fe, 0xfe },
00112 /*   char            char            char   A         char   A         char   a */
00113 { 0x00ff, 0xff }, { 0x00ff, 0xff }, { 0x0100, 0x41 }, { 0x0100, 0x41 }, { 0x0101, 0x61 },
00114 /*   char   a         char   A         char   A         char   a         char   a */
00115 { 0x0101, 0x61 }, { 0x0102, 0x41 }, { 0x0102, 0x41 }, { 0x0103, 0x61 }, { 0x0103, 0x61 },
00116 /*   char   A         char   A         char   a         char   a         char   C */
00117 { 0x0104, 0x41 }, { 0x0104, 0x41 }, { 0x0105, 0x61 }, { 0x0105, 0x61 }, { 0x0106, 0x43 },
00118 /*   char   C         char   c         char   c         char   C         char   C */
00119 { 0x0106, 0x43 }, { 0x0107, 0x63 }, { 0x0107, 0x63 }, { 0x0108, 0x43 }, { 0x0108, 0x43 },
00120 /*   char   c         char   c         char   C         char   C         char   c */
00121 { 0x0109, 0x63 }, { 0x0109, 0x63 }, { 0x010a, 0x43 }, { 0x010a, 0x43 }, { 0x010b, 0x63 },
00122 /*   char   c         char   C         char   C         char   c         char   c */
00123 { 0x010b, 0x63 }, { 0x010c, 0x43 }, { 0x010c, 0x43 }, { 0x010d, 0x63 }, { 0x010d, 0x63 },
00124 /*   char   D         char   D         char   d         char   d         char    */
00125 { 0x010e, 0x44 }, { 0x010e, 0x44 }, { 0x010f, 0x64 }, { 0x010f, 0x64 }, { 0x0110, 0xd0 },
00126 /*   char            char   d         char   d         char   E         char   E */
00127 { 0x0110, 0xd0 }, { 0x0111, 0x64 }, { 0x0111, 0x64 }, { 0x0112, 0x45 }, { 0x0112, 0x45 },
00128 /*   char   e         char   e         char   E         char   E         char   e */
00129 { 0x0113, 0x65 }, { 0x0113, 0x65 }, { 0x0114, 0x45 }, { 0x0114, 0x45 }, { 0x0115, 0x65 },
00130 /*   char   e         char   E         char   E         char   e         char   e */
00131 { 0x0115, 0x65 }, { 0x0116, 0x45 }, { 0x0116, 0x45 }, { 0x0117, 0x65 }, { 0x0117, 0x65 },
00132 /*   char   E         char   E         char   e         char   e         char   E */
00133 { 0x0118, 0x45 }, { 0x0118, 0x45 }, { 0x0119, 0x65 }, { 0x0119, 0x65 }, { 0x011a, 0x45 },
00134 /*   char   E         char   e         char   e         char   G         char   G */
00135 { 0x011a, 0x45 }, { 0x011b, 0x65 }, { 0x011b, 0x65 }, { 0x011c, 0x47 }, { 0x011c, 0x47 },
00136 /*   char   g         char   g         char   G         char   G         char   g */
00137 { 0x011d, 0x67 }, { 0x011d, 0x67 }, { 0x011e, 0x47 }, { 0x011e, 0x47 }, { 0x011f, 0x67 },
00138 /*   char   g         char   G         char   G         char   g         char   g */
00139 { 0x011f, 0x67 }, { 0x0120, 0x47 }, { 0x0120, 0x47 }, { 0x0121, 0x67 }, { 0x0121, 0x67 },
00140 /*   char   G         char   G         char   g         char   g         char   H */
00141 { 0x0122, 0x47 }, { 0x0122, 0x47 }, { 0x0123, 0x67 }, { 0x0123, 0x67 }, { 0x0124, 0x48 },
00142 /*   char   H         char   h         char   h         char   H         char   H */
00143 { 0x0124, 0x48 }, { 0x0125, 0x68 }, { 0x0125, 0x68 }, { 0x0126, 0x48 }, { 0x0126, 0x48 },
00144 /*   char   h         char   h         char   I         char   I         char   i */
00145 { 0x0127, 0x68 }, { 0x0127, 0x68 }, { 0x0128, 0x49 }, { 0x0128, 0x49 }, { 0x0129, 0x69 },
00146 /*   char   i         char   I         char   I         char   i         char   i */
00147 { 0x0129, 0x69 }, { 0x012a, 0x49 }, { 0x012a, 0x49 }, { 0x012b, 0x69 }, { 0x012b, 0x69 },
00148 /*   char   I         char   I         char   i         char   i         char   I */
00149 { 0x012c, 0x49 }, { 0x012c, 0x49 }, { 0x012d, 0x69 }, { 0x012d, 0x69 }, { 0x012e, 0x49 },
00150 /*   char   I         char   i         char   i         char   I         char   I */
00151 { 0x012e, 0x49 }, { 0x012f, 0x69 }, { 0x012f, 0x69 }, { 0x0130, 0x49 }, { 0x0130, 0x49 },
00152 /*   char   i         char   i         char   J         char   J         char   j */
00153 { 0x0131, 0x69 }, { 0x0131, 0x69 }, { 0x0134, 0x4a }, { 0x0134, 0x4a }, { 0x0135, 0x6a },
00154 /*   char   j         char   K         char   K         char   k         char   k */
00155 { 0x0135, 0x6a }, { 0x0136, 0x4b }, { 0x0136, 0x4b }, { 0x0137, 0x6b }, { 0x0137, 0x6b },
00156 /*   char   L         char   L         char   l         char   l         char   L */
00157 { 0x0139, 0x4c }, { 0x0139, 0x4c }, { 0x013a, 0x6c }, { 0x013a, 0x6c }, { 0x013b, 0x4c },
00158 /*   char   L         char   l         char   l         char   L         char   L */
00159 { 0x013b, 0x4c }, { 0x013c, 0x6c }, { 0x013c, 0x6c }, { 0x013d, 0x4c }, { 0x013d, 0x4c },
00160 /*   char   l         char   l         char   L         char   L         char   l */
00161 { 0x013e, 0x6c }, { 0x013e, 0x6c }, { 0x0141, 0x4c }, { 0x0141, 0x4c }, { 0x0142, 0x6c },
00162 /*   char   l         char   N         char   N         char   n         char   n */
00163 { 0x0142, 0x6c }, { 0x0143, 0x4e }, { 0x0143, 0x4e }, { 0x0144, 0x6e }, { 0x0144, 0x6e },
00164 /*   char   N         char   N         char   n         char   n         char   N */
00165 { 0x0145, 0x4e }, { 0x0145, 0x4e }, { 0x0146, 0x6e }, { 0x0146, 0x6e }, { 0x0147, 0x4e },
00166 /*   char   N         char   n         char   n         char   O         char   O */
00167 { 0x0147, 0x4e }, { 0x0148, 0x6e }, { 0x0148, 0x6e }, { 0x014c, 0x4f }, { 0x014c, 0x4f },
00168 /*   char   o         char   o         char   O         char   O         char   o */
00169 { 0x014d, 0x6f }, { 0x014d, 0x6f }, { 0x014e, 0x4f }, { 0x014e, 0x4f }, { 0x014f, 0x6f },
00170 /*   char   o         char   O         char   O         char   o         char   o */
00171 { 0x014f, 0x6f }, { 0x0150, 0x4f }, { 0x0150, 0x4f }, { 0x0151, 0x6f }, { 0x0151, 0x6f },
00172 /*   char            char            char            char            char   R */
00173 { 0x0152, 0x8c }, { 0x0152, 0x8c }, { 0x0153, 0x9c }, { 0x0153, 0x9c }, { 0x0154, 0x52 },
00174 /*   char   R         char   r         char   r         char   R         char   R */
00175 { 0x0154, 0x52 }, { 0x0155, 0x72 }, { 0x0155, 0x72 }, { 0x0156, 0x52 }, { 0x0156, 0x52 },
00176 /*   char   r         char   r         char   R         char   R         char   r */
00177 { 0x0157, 0x72 }, { 0x0157, 0x72 }, { 0x0158, 0x52 }, { 0x0158, 0x52 }, { 0x0159, 0x72 },
00178 /*   char   r         char   S         char   S         char   s         char   s */
00179 { 0x0159, 0x72 }, { 0x015a, 0x53 }, { 0x015a, 0x53 }, { 0x015b, 0x73 }, { 0x015b, 0x73 },
00180 /*   char   S         char   S         char   s         char   s         char   S */
00181 { 0x015c, 0x53 }, { 0x015c, 0x53 }, { 0x015d, 0x73 }, { 0x015d, 0x73 }, { 0x015e, 0x53 },
00182 /*   char   S         char   s         char   s         char            char    */
00183 { 0x015e, 0x53 }, { 0x015f, 0x73 }, { 0x015f, 0x73 }, { 0x0160, 0x8a }, { 0x0160, 0x8a },
00184 /*   char            char            char   T         char   T         char   t */
00185 { 0x0161, 0x9a }, { 0x0161, 0x9a }, { 0x0162, 0x54 }, { 0x0162, 0x54 }, { 0x0163, 0x74 },
00186 /*   char   t         char   T         char   T         char   t         char   t */
00187 { 0x0163, 0x74 }, { 0x0164, 0x54 }, { 0x0164, 0x54 }, { 0x0165, 0x74 }, { 0x0165, 0x74 },
00188 /*   char   T         char   T         char   t         char   t         char   U */
00189 { 0x0166, 0x54 }, { 0x0166, 0x54 }, { 0x0167, 0x74 }, { 0x0167, 0x74 }, { 0x0168, 0x55 },
00190 /*   char   U         char   u         char   u         char   U         char   U */
00191 { 0x0168, 0x55 }, { 0x0169, 0x75 }, { 0x0169, 0x75 }, { 0x016a, 0x55 }, { 0x016a, 0x55 },
00192 /*   char   u         char   u         char   U         char   U         char   u */
00193 { 0x016b, 0x75 }, { 0x016b, 0x75 }, { 0x016c, 0x55 }, { 0x016c, 0x55 }, { 0x016d, 0x75 },
00194 /*   char   u         char   U         char   U         char   u         char   u */
00195 { 0x016d, 0x75 }, { 0x016e, 0x55 }, { 0x016e, 0x55 }, { 0x016f, 0x75 }, { 0x016f, 0x75 },
00196 /*   char   U         char   U         char   u         char   u         char   U */
00197 { 0x0170, 0x55 }, { 0x0170, 0x55 }, { 0x0171, 0x75 }, { 0x0171, 0x75 }, { 0x0172, 0x55 },
00198 /*   char   U         char   u         char   u         char   W         char   W */
00199 { 0x0172, 0x55 }, { 0x0173, 0x75 }, { 0x0173, 0x75 }, { 0x0174, 0x57 }, { 0x0174, 0x57 },
00200 /*   char   w         char   w         char   Y         char   Y         char   y */
00201 { 0x0175, 0x77 }, { 0x0175, 0x77 }, { 0x0176, 0x59 }, { 0x0176, 0x59 }, { 0x0177, 0x79 },
00202 /*   char   y         char            char            char   Z         char   Z */
00203 { 0x0177, 0x79 }, { 0x0178, 0x9f }, { 0x0178, 0x9f }, { 0x0179, 0x5a }, { 0x0179, 0x5a },
00204 /*   char   z         char   z         char   Z         char   Z         char   z */
00205 { 0x017a, 0x7a }, { 0x017a, 0x7a }, { 0x017b, 0x5a }, { 0x017b, 0x5a }, { 0x017c, 0x7a },
00206 /*   char   z         char            char            char            char    */
00207 { 0x017c, 0x7a }, { 0x017d, 0x8e }, { 0x017d, 0x8e }, { 0x017e, 0x9e }, { 0x017e, 0x9e },
00208 /*   char   b         char   b         char            char            char    */
00209 { 0x0180, 0x62 }, { 0x0180, 0x62 }, { 0x0189, 0xd0 }, { 0x0189, 0xd0 }, { 0x0191, 0x83 },
00210 /*   char            char            char            char   I         char   I */
00211 { 0x0191, 0x83 }, { 0x0192, 0x83 }, { 0x0192, 0x83 }, { 0x0197, 0x49 }, { 0x0197, 0x49 },
00212 /*   char   l         char   l         char   O         char   O         char   O */
00213 { 0x019a, 0x6c }, { 0x019a, 0x6c }, { 0x019f, 0x4f }, { 0x019f, 0x4f }, { 0x01a0, 0x4f },
00214 /*   char   O         char   o         char   o         char   t         char   t */
00215 { 0x01a0, 0x4f }, { 0x01a1, 0x6f }, { 0x01a1, 0x6f }, { 0x01ab, 0x74 }, { 0x01ab, 0x74 },
00216 /*   char   T         char   T         char   U         char   U         char   u */
00217 { 0x01ae, 0x54 }, { 0x01ae, 0x54 }, { 0x01af, 0x55 }, { 0x01af, 0x55 }, { 0x01b0, 0x75 },
00218 /*   char   u         char   z         char   z         char   |         char   | */
00219 { 0x01b0, 0x75 }, { 0x01b6, 0x7a }, { 0x01b6, 0x7a }, { 0x01c0, 0x7c }, { 0x01c0, 0x7c },
00220 /*   char   !         char   !         char   A         char   A         char   a */
00221 { 0x01c3, 0x21 }, { 0x01c3, 0x21 }, { 0x01cd, 0x41 }, { 0x01cd, 0x41 }, { 0x01ce, 0x61 },
00222 /*   char   a         char   I         char   I         char   i         char   i */
00223 { 0x01ce, 0x61 }, { 0x01cf, 0x49 }, { 0x01cf, 0x49 }, { 0x01d0, 0x69 }, { 0x01d0, 0x69 },
00224 /*   char   O         char   O         char   o         char   o         char   U */
00225 { 0x01d1, 0x4f }, { 0x01d1, 0x4f }, { 0x01d2, 0x6f }, { 0x01d2, 0x6f }, { 0x01d3, 0x55 },
00226 /*   char   U         char   u         char   u         char   U         char   U */
00227 { 0x01d3, 0x55 }, { 0x01d4, 0x75 }, { 0x01d4, 0x75 }, { 0x01d5, 0x55 }, { 0x01d5, 0x55 },
00228 /*   char   u         char   u         char   U         char   U         char   u */
00229 { 0x01d6, 0x75 }, { 0x01d6, 0x75 }, { 0x01d7, 0x55 }, { 0x01d7, 0x55 }, { 0x01d8, 0x75 },
00230 /*   char   u         char   U         char   U         char   u         char   u */
00231 { 0x01d8, 0x75 }, { 0x01d9, 0x55 }, { 0x01d9, 0x55 }, { 0x01da, 0x75 }, { 0x01da, 0x75 },
00232 /*   char   U         char   U         char   u         char   u         char   A */
00233 { 0x01db, 0x55 }, { 0x01db, 0x55 }, { 0x01dc, 0x75 }, { 0x01dc, 0x75 }, { 0x01de, 0x41 },
00234 /*   char   A         char   a         char   a         char   G         char   G */
00235 { 0x01de, 0x41 }, { 0x01df, 0x61 }, { 0x01df, 0x61 }, { 0x01e4, 0x47 }, { 0x01e4, 0x47 },
00236 /*   char   g         char   g         char   G         char   G         char   g */
00237 { 0x01e5, 0x67 }, { 0x01e5, 0x67 }, { 0x01e6, 0x47 }, { 0x01e6, 0x47 }, { 0x01e7, 0x67 },
00238 /*   char   g         char   K         char   K         char   k         char   k */
00239 { 0x01e7, 0x67 }, { 0x01e8, 0x4b }, { 0x01e8, 0x4b }, { 0x01e9, 0x6b }, { 0x01e9, 0x6b },
00240 /*   char   O         char   O         char   o         char   o         char   O */
00241 { 0x01ea, 0x4f }, { 0x01ea, 0x4f }, { 0x01eb, 0x6f }, { 0x01eb, 0x6f }, { 0x01ec, 0x4f },
00242 /*   char   O         char   o         char   o         char   j         char   j */
00243 { 0x01ec, 0x4f }, { 0x01ed, 0x6f }, { 0x01ed, 0x6f }, { 0x01f0, 0x6a }, { 0x01f0, 0x6a },
00244 /*   char   g         char   g         char   '         char   '         char   " */
00245 { 0x0261, 0x67 }, { 0x0261, 0x67 }, { 0x02b9, 0x27 }, { 0x02b9, 0x27 }, { 0x02ba, 0x22 },
00246 /*   char   "         char   '         char   '         char   ^         char   ^ */
00247 { 0x02ba, 0x22 }, { 0x02bc, 0x27 }, { 0x02bc, 0x27 }, { 0x02c4, 0x5e }, { 0x02c4, 0x5e },
00248 /*   char            char            char   '         char   '         char    */
00249 { 0x02c6, 0x88 }, { 0x02c6, 0x88 }, { 0x02c8, 0x27 }, { 0x02c8, 0x27 }, { 0x02c9, 0xaf },
00250 /*   char            char            char            char   `         char   ` */
00251 { 0x02c9, 0xaf }, { 0x02ca, 0xb4 }, { 0x02ca, 0xb4 }, { 0x02cb, 0x60 }, { 0x02cb, 0x60 },
00252 /*   char   _         char   _         char            char            char    */
00253 { 0x02cd, 0x5f }, { 0x02cd, 0x5f }, { 0x02da, 0xb0 }, { 0x02da, 0xb0 }, { 0x02dc, 0x98 },
00254 /*   char            char   `         char   `         char            char    */
00255 { 0x02dc, 0x98 }, { 0x0300, 0x60 }, { 0x0300, 0x60 }, { 0x0301, 0xb4 }, { 0x0301, 0xb4 },
00256 /*   char   ^         char   ^         char   ~         char   ~         char    */
00257 { 0x0302, 0x5e }, { 0x0302, 0x5e }, { 0x0303, 0x7e }, { 0x0303, 0x7e }, { 0x0304, 0xaf },
00258 /*   char            char            char            char            char    */
00259 { 0x0304, 0xaf }, { 0x0305, 0xaf }, { 0x0305, 0xaf }, { 0x0308, 0xa8 }, { 0x0308, 0xa8 },
00260 /*   char            char            char   "         char   "         char    */
00261 { 0x030a, 0xb0 }, { 0x030a, 0xb0 }, { 0x030e, 0x22 }, { 0x030e, 0x22 }, { 0x0327, 0xb8 },
00262 /*   char            char   _         char   _         char   _         char   _ */
00263 { 0x0327, 0xb8 }, { 0x0331, 0x5f }, { 0x0331, 0x5f }, { 0x0332, 0x5f }, { 0x0332, 0x5f },
00264 /*   char   ;         char   ;         char   G         char   G         char   T */
00265 { 0x037e, 0x3b }, { 0x037e, 0x3b }, { 0x0393, 0x47 }, { 0x0393, 0x47 }, { 0x0398, 0x54 },
00266 /*   char   T         char   S         char   S         char   F         char   F */
00267 { 0x0398, 0x54 }, { 0x03a3, 0x53 }, { 0x03a3, 0x53 }, { 0x03a6, 0x46 }, { 0x03a6, 0x46 },
00268 /*   char   O         char   O         char   a         char   a         char    */
00269 { 0x03a9, 0x4f }, { 0x03a9, 0x4f }, { 0x03b1, 0x61 }, { 0x03b1, 0x61 }, { 0x03b2, 0xdf },
00270 /*   char            char   d         char   d         char   e         char   e */
00271 { 0x03b2, 0xdf }, { 0x03b4, 0x64 }, { 0x03b4, 0x64 }, { 0x03b5, 0x65 }, { 0x03b5, 0x65 },
00272 /*   char            char            char   p         char   p         char   s */
00273 { 0x03bc, 0xb5 }, { 0x03bc, 0xb5 }, { 0x03c0, 0x70 }, { 0x03c0, 0x70 }, { 0x03c3, 0x73 },
00274 /*   char   s         char   t         char   t         char   f         char   f */
00275 { 0x03c3, 0x73 }, { 0x03c4, 0x74 }, { 0x03c4, 0x74 }, { 0x03c6, 0x66 }, { 0x03c6, 0x66 },
00276 /*   char   h         char   h         char   :         char   :         char   % */
00277 { 0x04bb, 0x68 }, { 0x04bb, 0x68 }, { 0x0589, 0x3a }, { 0x0589, 0x3a }, { 0x066a, 0x25 },
00278 /*   char   %         char   +         char   +         char   +         char   + */
00279 { 0x066a, 0x25 }, { 0x2000, 0x2b }, { 0x2001, 0x2b }, { 0x2002, 0x2b }, { 0x2003, 0x2b },
00280 /*   char   +         char   +         char   +         char   -         char   - */
00281 { 0x2004, 0x2b }, { 0x2005, 0x2b }, { 0x2006, 0x2b }, { 0x2010, 0x2d }, { 0x2011, 0x2d },
00282 /*   char            char            char   =         char            char    */
00283 { 0x2013, 0x96 }, { 0x2014, 0x97 }, { 0x2017, 0x3d }, { 0x2018, 0x91 }, { 0x2019, 0x92 },
00284 /*   char            char            char            char            char    */
00285 { 0x201a, 0x82 }, { 0x201c, 0x93 }, { 0x201d, 0x94 }, { 0x201e, 0x84 }, { 0x2020, 0x86 },
00286 /*   char            char            char            char            char    */
00287 { 0x2021, 0x87 }, { 0x2022, 0x95 }, { 0x2024, 0xb7 }, { 0x2026, 0x85 }, { 0x2030, 0x89 },
00288 /*   char   '         char   `         char            char            char    */
00289 { 0x2032, 0x27 }, { 0x2035, 0x60 }, { 0x2039, 0x8b }, { 0x203a, 0x9b }, { 0x2044, 0x2f },
00290 /*   char            char   4         char   5         char   6         char   7 */
00291 { 0x2070, 0xb0 }, { 0x2074, 0x34 }, { 0x2075, 0x35 }, { 0x2076, 0x36 }, { 0x2077, 0x37 },
00292 /*   char   8         char   n         char   0         char   1         char   2 */
00293 { 0x2078, 0x38 }, { 0x207f, 0x6e }, { 0x2080, 0x30 }, { 0x2081, 0x31 }, { 0x2082, 0x32 },
00294 /*   char   3         char   4         char   5         char   6         char   7 */
00295 { 0x2083, 0x33 }, { 0x2084, 0x34 }, { 0x2085, 0x35 }, { 0x2086, 0x36 }, { 0x2087, 0x37 },
00296 /*   char   8         char   9         char            char            char   P */
00297 { 0x2088, 0x38 }, { 0x2089, 0x39 }, { 0x20a1, 0xa2 }, { 0x20a4, 0xa3 }, { 0x20a7, 0x50 },
00298 /*   char            char   C         char   E         char   g         char   H */
00299 { 0x20ac, 0x80 }, { 0x2102, 0x43 }, { 0x2107, 0x45 }, { 0x210a, 0x67 }, { 0x210b, 0x48 },
00300 /*   char   H         char   H         char   h         char   I         char   I */
00301 { 0x210c, 0x48 }, { 0x210d, 0x48 }, { 0x210e, 0x68 }, { 0x2110, 0x49 }, { 0x2111, 0x49 },
00302 /*   char   L         char   l         char   N         char   P         char   P */
00303 { 0x2112, 0x4c }, { 0x2113, 0x6c }, { 0x2115, 0x4e }, { 0x2118, 0x50 }, { 0x2119, 0x50 },
00304 /*   char   Q         char   R         char   R         char   R         char    */
00305 { 0x211a, 0x51 }, { 0x211b, 0x52 }, { 0x211c, 0x52 }, { 0x211d, 0x52 }, { 0x2122, 0x99 },
00306 /*   char   Z         char   Z         char   K         char            char   B */
00307 { 0x2124, 0x5a }, { 0x2128, 0x5a }, { 0x212a, 0x4b }, { 0x212b, 0xc5 }, { 0x212c, 0x42 },
00308 /*   char   C         char   e         char   e         char   E         char   F */
00309 { 0x212d, 0x43 }, { 0x212e, 0x65 }, { 0x212f, 0x65 }, { 0x2130, 0x45 }, { 0x2131, 0x46 },
00310 /*   char   M         char   o         char            char   -         char    */
00311 { 0x2133, 0x4d }, { 0x2134, 0x6f }, { 0x2205, 0xd8 }, { 0x2212, 0x2d }, { 0x2213, 0xb1 },
00312 /*   char    /         char    *         char            char            char   v */
00313 { 0x2215, 0x2f }, { 0x2217, 0x2a }, { 0x2218, 0xb0 }, { 0x2219, 0xb7 }, { 0x221a, 0x76 },
00314 /*   char   8         char   |         char   n         char   :         char   ~ */
00315 { 0x221e, 0x38 }, { 0x2223, 0x7c }, { 0x2229, 0x6e }, { 0x2236, 0x3a }, { 0x223c, 0x7e },
00316 /*   char            char   =         char   =         char   =         char    */
00317 { 0x2248, 0x98 }, { 0x2261, 0x3d }, { 0x2264, 0x3d }, { 0x2265, 0x3d }, { 0x226a, 0xab },
00318 /*   char            char            char            char   ^         char    */
00319 { 0x226b, 0xbb }, { 0x22c5, 0xb7 }, { 0x2302, 0xa6 }, { 0x2303, 0x5e }, { 0x2310, 0xac },
00320 /*   char   (         char   )         char   <         char   >         char   - */
00321 { 0x2320, 0x28 }, { 0x2321, 0x29 }, { 0x2329, 0x3c }, { 0x232a, 0x3e }, { 0x2500, 0x2d },
00322 /*   char            char   +         char   +         char   +         char   + */
00323 { 0x2502, 0xa6 }, { 0x250c, 0x2b }, { 0x2510, 0x2b }, { 0x2514, 0x2b }, { 0x2518, 0x2b },
00324 /*   char   +         char            char   -         char   -         char   + */
00325 { 0x251c, 0x2b }, { 0x2524, 0xa6 }, { 0x252c, 0x2d }, { 0x2534, 0x2d }, { 0x253c, 0x2b },
00326 /*   char   -         char            char   +         char   +         char   + */
00327 { 0x2550, 0x2d }, { 0x2551, 0xa6 }, { 0x2552, 0x2b }, { 0x2553, 0x2b }, { 0x2554, 0x2b },
00328 /*   char   +         char   +         char   +         char   +         char   + */
00329 { 0x2555, 0x2b }, { 0x2556, 0x2b }, { 0x2557, 0x2b }, { 0x2558, 0x2b }, { 0x2559, 0x2b },
00330 /*   char   +         char   +         char   +         char   +         char    */
00331 { 0x255a, 0x2b }, { 0x255b, 0x2b }, { 0x255c, 0x2b }, { 0x255d, 0x2b }, { 0x255e, 0xa6 },
00332 /*   char            char            char            char            char    */
00333 { 0x255f, 0xa6 }, { 0x2560, 0xa6 }, { 0x2561, 0xa6 }, { 0x2562, 0xa6 }, { 0x2563, 0xa6 },
00334 /*   char   -         char   -         char   -         char   -         char   - */
00335 { 0x2564, 0x2d }, { 0x2565, 0x2d }, { 0x2566, 0x2d }, { 0x2567, 0x2d }, { 0x2568, 0x2d },
00336 /*   char   -         char   +         char   +         char   +         char    */
00337 { 0x2569, 0x2d }, { 0x256a, 0x2b }, { 0x256b, 0x2b }, { 0x256c, 0x2b }, { 0x2580, 0xaf },
00338 /*   char   _         char            char            char            char    */
00339 { 0x2584, 0x5f }, { 0x2588, 0xa6 }, { 0x258c, 0xa6 }, { 0x2590, 0xa6 }, { 0x2591, 0xa6 },
00340 /*   char            char            char            char            char   | */
00341 { 0x2592, 0xa6 }, { 0x2593, 0xa6 }, { 0x25a0, 0xa6 }, { 0x263c, 0xa4 }, { 0x2758, 0x7c },
00342 /*   char   +         char   <         char   >         char            char    */
00343 { 0x3000, 0x2b }, { 0x3008, 0x3c }, { 0x3009, 0x3e }, { 0x300a, 0xab }, { 0x300b, 0xbb },
00344 /*   char   [         char   ]         char            char   !         char   " */
00345 { 0x301a, 0x5b }, { 0x301b, 0x5d }, { 0x30fb, 0xb7 }, { 0xff01, 0x21 }, { 0xff02, 0x22 },
00346 /*   char   #         char   $         char   %         char   &         char   ' */
00347 { 0xff03, 0x23 }, { 0xff04, 0x24 }, { 0xff05, 0x25 }, { 0xff06, 0x26 }, { 0xff07, 0x27 },
00348 /*   char   (         char   )         char    *         char   +         char   , */
00349 { 0xff08, 0x28 }, { 0xff09, 0x29 }, { 0xff0a, 0x2a }, { 0xff0b, 0x2b }, { 0xff0c, 0x2c },
00350 /*   char   -         char   .         char            char   0         char   1 */
00351 { 0xff0d, 0x2d }, { 0xff0e, 0x2e }, { 0xff0f, 0x2f }, { 0xff10, 0x30 }, { 0xff11, 0x31 },
00352 /*   char   2         char   3         char   4         char   5         char   6 */
00353 { 0xff12, 0x32 }, { 0xff13, 0x33 }, { 0xff14, 0x34 }, { 0xff15, 0x35 }, { 0xff16, 0x36 },
00354 /*   char   7         char   8         char   9         char   :         char   ; */
00355 { 0xff17, 0x37 }, { 0xff18, 0x38 }, { 0xff19, 0x39 }, { 0xff1a, 0x3a }, { 0xff1b, 0x3b },
00356 /*   char   <         char   =         char   >         char   @         char   A */
00357 { 0xff1c, 0x3c }, { 0xff1d, 0x3d }, { 0xff1e, 0x3e }, { 0xff20, 0x40 }, { 0xff21, 0x41 },
00358 /*   char   B         char   C         char   D         char   E         char   F */
00359 { 0xff22, 0x42 }, { 0xff23, 0x43 }, { 0xff24, 0x44 }, { 0xff25, 0x45 }, { 0xff26, 0x46 },
00360 /*   char   G         char   H         char   I         char   J         char   K */
00361 { 0xff27, 0x47 }, { 0xff28, 0x48 }, { 0xff29, 0x49 }, { 0xff2a, 0x4a }, { 0xff2b, 0x4b },
00362 /*   char   L         char   M         char   N         char   O         char   P */
00363 { 0xff2c, 0x4c }, { 0xff2d, 0x4d }, { 0xff2e, 0x4e }, { 0xff2f, 0x4f }, { 0xff30, 0x50 },
00364 /*   char   Q         char   R         char   S         char   T         char   U */
00365 { 0xff31, 0x51 }, { 0xff32, 0x52 }, { 0xff33, 0x53 }, { 0xff34, 0x54 }, { 0xff35, 0x55 },
00366 /*   char   V         char   W         char   X         char   Y         char   Z */
00367 { 0xff36, 0x56 }, { 0xff37, 0x57 }, { 0xff38, 0x58 }, { 0xff39, 0x59 }, { 0xff3a, 0x5a },
00368 /*   char   [         char   ]         char   ^         char   _         char   ` */
00369 { 0xff3b, 0x5b }, { 0xff3d, 0x5d }, { 0xff3e, 0x5e }, { 0xff3f, 0x5f }, { 0xff40, 0x60 },
00370 /*   char   a         char   b         char   c         char   d         char   e */
00371 { 0xff41, 0x61 }, { 0xff42, 0x62 }, { 0xff43, 0x63 }, { 0xff44, 0x64 }, { 0xff45, 0x65 },
00372 /*   char   f         char   g         char   h         char   i         char   j */
00373 { 0xff46, 0x66 }, { 0xff47, 0x67 }, { 0xff48, 0x68 }, { 0xff49, 0x69 }, { 0xff4a, 0x6a },
00374 /*   char   k         char   l         char   m         char   n         char   o */
00375 { 0xff4b, 0x6b }, { 0xff4c, 0x6c }, { 0xff4d, 0x6d }, { 0xff4e, 0x6e }, { 0xff4f, 0x6f },
00376 /*   char   p         char   q         char   r         char   s         char   t */
00377 { 0xff50, 0x70 }, { 0xff51, 0x71 }, { 0xff52, 0x72 }, { 0xff53, 0x73 }, { 0xff54, 0x74 },
00378 /*   char   u         char   v         char   w         char   x         char   y */
00379 { 0xff55, 0x75 }, { 0xff56, 0x76 }, { 0xff57, 0x77 }, { 0xff58, 0x78 }, { 0xff59, 0x79 },
00380 /*   char   z         char   {         char   |         char   }         char   ~ */
00381 { 0xff5a, 0x7a }, { 0xff5b, 0x7b }, { 0xff5c, 0x7c }, { 0xff5d, 0x7d }, { 0xff5e, 0x7e },
00382 /* end-of-array marker */
00383 { 0, 0 }    };
00384 
00385 /************************************************
00386 * Set the values
00387 ************************************************/
00388 void init_codes(){
00389         int i;
00390     unicode_entry *ptr;
00391         
00392         for (i=0;i<65536;i++)
00393                 codes[i]=0x0;  /*question mark*/
00394         
00395         /*the first 128 entries are the same as ascii*/
00396         for (i=0;i<128;i++)
00397                 codes[i] = (char) i;
00398         
00399     ptr=unicode_data;
00400     while(ptr->index != 0) {
00401         codes[ptr->index] = (char) ptr->val;
00402         ptr++;
00403     }
00404 
00405 
00406 }

Generated on Sun May 14 14:51:12 2006 by  doxygen 1.4.2