[Snort-devel] spp_unidecode

anon anonpoet at ...284...
Wed Feb 21 16:32:41 EST 2001


I whipped up a quick iis unicode decoder that is a drop
in replacement for http_decode if anyone wants to
play with it.  I'm still trying to determine all the mappings.
I've got a couple of other sources to merge in, but it
was able to decode all the requests hitting my network over
the last few days.  Any of you european/asian guys that use
more unicode want to try it?

Jason Larsen
larsjaso at ...283...
-------------- next part --------------
/****************************************************
* spp_unidecode.h
*
* decodes UTF-8 encoded requests.  
* 
* Notes:
*   Arguments are the same as the http_decode plugin
*   Checks for NULL CGI and Unicode Directory Trans
*****************************************************/

#include "spp_unidecode.h"
#include "codes.h"
#include <ctype.h>

#define MODNAME "spp_unidecode"

#define NOCGINULL "-cginull"
#define NOUNICODE "-unicode"

int Ucheck_cgi_null = 1;
int Ucheck_iis_unicode = 1;

extern char *file_name;
extern int file_line;

/* Instantiate the list of ports we're going to watch */
UPortList UnidecodePorts;

/*local function declares*/
int TranslateUnicode(char* InBuff, int InLength, char* OutBuff, int OutLength, Packet* p);
int GetNextChar(char* Buff, char* NextChar, Packet* p);
void CheckNull(unsigned long c, Packet* p);
void CheckDirTrans(unsigned long c, Packet* p);
void LogUnknown(Packet* p);
void LogInvalid(Packet* p);

/*
 * Function: SetupHttpDecode()
 *
 * Purpose: Registers the preprocessor keyword and initialization 
 *          function into the preprocessor list.
 *
 * Arguments: None.
 *
 * Returns: void function
 *
 */
void SetupUnidecode()
{
    /* link the preprocessor keyword to the init function in 
       the preproc list */
    RegisterPreprocessor("unidecode", UnidecodeInit);

#ifdef DEBUG
    printf("Preprocessor: Unidecode in setup...\n");
#endif
}


/*
 * Function: HttpDecodeInit(u_char *)
 *
 * Purpose: Processes the args sent to the preprocessor, sets up the
 *          port list, links the processing function into the preproc
 *          function list
 *
 * Arguments: args => ptr to argument string
 *
 * Returns: void function
 *
 */
void UnidecodeInit(u_char *args)
{
#ifdef DEBUG
    printf("Preprocessor: HttpDecode Initialized\n");
#endif

    /* parse the argument list into a list of ports to normalize */
    USetPorts(args);
	init_codes();

    /* Set the preprocessor function into the function list */
    AddFuncToPreprocList(UPreprocUrlDecode);
}



/*
 * Function: SetPorts(char *)
 *
 * Purpose: Reads the list of port numbers from the argument string and 
 *          parses them into the port list data struct
 *
 * Arguments: portlist => argument list
 *
 * Returns: void function
 *
 */
void USetPorts(char *portlist)
{
    char **toks;
    int num_toks;
    int num_ports = 0;
    int num;

    if(portlist == NULL)
    {
        FatalError("ERROR %s (%d)=> No arguments to http_decode preprocessor!\n", file_name, file_line);
    }

    /* tokenize the argument list */
    toks = mSplit(portlist, " ", 31, &num_toks, '\\');

    /* convert the tokens and place them into the port list */
    for(num = 0; num < num_toks; num++)
    {
       if(!strncmp(NOUNICODE, toks[num], sizeof NOUNICODE))
        {
            Ucheck_iis_unicode = 0;
        }
        else if(!strncmp(NOCGINULL, toks[num], sizeof NOCGINULL))
        {
            Ucheck_cgi_null = 0;
        }
        else
        {
            UnidecodePorts.ports[num_ports++] = atoi(toks[num]);
        }
     }   

    UnidecodePorts.num_entries = num_ports;

#ifdef DEBUG
    printf("Decoding HTTP on %d ports: ", UnidecodePorts.num_entries);

    for(num_ports = 0; num_ports < UnidecodePorts.num_entries; num_ports++)
    {
        printf("%d ", UnidecodePorts.ports[num_ports]);
    }

    printf("\n");
#endif

}

/*
 * Function: PreprocUrlDecode(Packet *)
 *
 * Purpose: Inspects the packet's payload for "Escaped" characters and 
 *          converts them back to their ASCII values.  This function
 *          is based on the NCSA code and was contributed by Michael Henry!
 *
 * Arguments: p => pointer to the current packet data struct 
 *
 * Returns: void function
 *
 */
void UPreprocUrlDecode(Packet *p)
{
    char *url;       /* this is where the converted data will be written */
    char *index;     /* this is the index pointer to walk thru the data */
    char *end;       /* points to the end of the payload, for loop control */
    u_int16_t psize; /* payload size */
    int i;           /* loop counter */

#ifdef DEBUG
    printf("http decoder init on %d bytes\n", p->dsize);
#endif

    /* check to make sure we're talking TCP and that the TWH has already
       completed before processing anything */
    if(!PacketIsTCP(p))
    {
#ifdef DEBUG
        printf("It isn't TCP session traffic\n");
#endif
        return;
    }

    if(!IsTcpSessionTraffic(p))
    {
#ifdef DEBUG
        printf("It isn't TCP session traffic\n");
#endif
        return;
    }

    /* check the port against the decode port list */
    for(i = 0; i < UnidecodePorts.num_entries; i++)
    {
        if(UnidecodePorts.ports[i] == p->dp)
        {
            /* on match, normalize the data */
#ifdef DEBUG
            printf("Got HTTP traffic (%d bytes)!\n", p->dsize);
            printf("%s\n", p->data);
#endif
            /* setup the pointers */
            url =   (char *) p->data;
            index = (char *) p->data;
            end =   (char *) p->data + p->dsize;
            psize = (u_int16_t) (p->dsize);

            /* walk thru each char in the payload */
			p->dsize = TranslateUnicode(url, p->dsize, index, p->dsize, p);

            /* set the payload size to reflect the new size */ 
            //p->dsize = psize;

#ifdef DEBUG
            printf("New size: %d\n", p->dsize);
            printf("converted data:\n");
            PrintNetData(stdout, p->data, p->dsize);
#endif

            return;
        }
    }
}



int TranslateUnicode(char* InBuff, int InLength, char* OutBuff, int OutLength, Packet* p){	
	int	i;
	int	out_pos;
	int	num_this_char;
	char	new_char;

#ifdef DEBUG
	printf("Decoding\n");
#endif
			
	out_pos=0;
	i=0;
	while ((num_this_char=GetNextChar(&InBuff[i], &new_char, p))){
		if (out_pos!=OutLength){
			OutBuff[out_pos++]=new_char;
		}else{
			OutBuff[out_pos]=0;
			return out_pos;
		}
		
		i=i+num_this_char;
		
		if (i>InLength){
			return out_pos;
		}
	}
	
	return out_pos;
}


/*******************************************
* returns the number of bytes used in the 
* IN buff to make the character
*******************************************/
int GetNextChar(char* Buff, char* NextChar, Packet* p){
	char			Code[3];
	unsigned long 	Hex;
	unsigned long 	Hex2;
	unsigned long 	Hex3;

	NextChar[0]=Buff[0];

	if (Buff[0]==0){
		return 0;
	}
	
	if (Buff[0]==0x25){
		Code[0]=Buff[1];
		Code[1]=Buff[2];
		Code[2]=0;
		Hex = strtoul(Code, NULL, 16);
		
		if ((Hex & 128)==0){
			NextChar[0] = codes[Hex];
			CheckNull(Hex, p);
			CheckDirTrans(Hex, p);
			return 3;
		}else if ((Hex & 224) == 192){
			if (Buff[3]!=0x25){
#ifdef DEBUG
				printf("Invalid UTF-8 Code\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			
			Code[0]=Buff[4];
			Code[1]=Buff[5];
			Code[2]=0;
			Hex2 = strtoul(Code, NULL, 16);
			
						
			if ((Hex2 & 192)!=128){
#ifdef DEBUG
				printf("Second Byte Invalid\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			
			Hex = Hex & 31;
			Hex2 = Hex2 & 63;	
			CheckNull((Hex * 64) | Hex2, p);
			CheckDirTrans((Hex * 64) | Hex2, p);
			
			if (codes[(Hex * 64) | Hex2]==0){
#ifdef DEBUG
				printf("Unknown mapping\n");
#endif
				LogUnknown(p);
				NextChar[0]=Buff[0];
				return 1;
			}else{
				NextChar[0] = codes[(Hex * 64) | Hex2];
				return 6;
			}
		}else if ((Hex & 240) == 224){
			if (Buff[3]!=0x25){
#ifdef DEBUG
				printf("Invalid UTF-8 Code\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			if (Buff[6]!=0x25){
#ifdef DEBUG
				printf("Invalid UTF-8 Code\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			
			Code[0]=Buff[4];
			Code[1]=Buff[5];
			Code[2]=0;
			Hex2 = strtoul(Code, NULL, 16);
						
			if ((Hex2 & 192)!=128){
#ifdef DEBUG
				printf("Second Byte Invalid\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			
			Code[0]=Buff[7];
			Code[1]=Buff[8];
			Code[2]=0;
			Hex3 = strtoul(Code, NULL, 16);
						
			if ((Hex3 & 192)!=128){
#ifdef DEBUG
				printf("Third Byte Invalid\n");
#endif
				LogInvalid(p);
				NextChar[0]=Buff[0];
				return 1;
			}
			
			Hex = Hex & 15;
			Hex2 = Hex2 & 63;	
			Hex3 = Hex3 & 63;	
			
			if ( codes[(Hex * 4096) | (Hex2 * 64) | Hex3] ==0){
#ifdef DEBUG
				printf("Unknown Mapping\n");
#endif
				LogUnknown(p);
				NextChar[0]=Buff[0];
				return 1;
			}else{
				NextChar[0] = codes[(Hex * 4096) | (Hex2 * 64) | Hex3];
				CheckNull((Hex * 4096) | (Hex2 * 64) | Hex3, p);
				CheckDirTrans((Hex * 4096) | (Hex2 * 64) | Hex3, p);
				return 9;
			}
		}		
	}else{
		NextChar[0] = Buff[0];
	}

	return 1;
}

/*************************************************
* Check for Null cgi attack
*************************************************/
void CheckNull(unsigned long c, Packet* p){
	char logMessage[180];
	
	if (!Ucheck_cgi_null) return;
	
	if (c==0){
		snprintf(logMessage, sizeof(logMessage), 
			MODNAME ": CGI Null Byte attack detected");
		CallAlertFuncs(p, logMessage, NULL);
		CallLogFuncs(p, logMessage, NULL);
	}
}

/***************************************************
* Check for the unicode directory transveral attack
***************************************************/
void CheckDirTrans(unsigned long c, Packet* p){
	char logMessage[180];
	
	if (!Ucheck_iis_unicode) return;
	
	if ( (c==0x5c) || (c==0x2f) || (c==0x2e) ){
		snprintf(logMessage, sizeof(logMessage), 
			MODNAME ": Unicode Directory Transversal attack detected");
		CallAlertFuncs(p, logMessage, NULL);
		CallLogFuncs(p, logMessage, NULL);
	}
}

/****************************************************
* We don't know what this is
****************************************************/
void LogUnknown(Packet* p){
	char logMessage[180];
	
	snprintf(logMessage, sizeof(logMessage), 
		MODNAME ": Unknown Unicode Mapping.  If you know what this maps to contact anonpoet at inconnu.isu.edu.");
	CallAlertFuncs(p, logMessage, NULL);
	CallLogFuncs(p, logMessage, NULL);
}

/***************************************************
* This combination can't exist
***************************************************/
void LogInvalid(Packet* p){
	char logMessage[180];
	
	snprintf(logMessage, sizeof(logMessage), 
		MODNAME ": Invalid Unicode String detected");
	CallAlertFuncs(p, logMessage, NULL);
	CallLogFuncs(p, logMessage, NULL);
}
-------------- next part --------------
/***********************************************
* spp_unidecode.h
*
* decodes UTF-8 encoded requests.  
*
***********************************************/

#include "snort.h"

#ifndef __SPP_UNIDECODE_H__
#define __SPP_UNIDECODE_H__

/* this is where we keep the list of ports that this process is 
   going to be applied to */
typedef struct _UPortList
{
    int ports[32];   /* 32 is kind of arbitrary */

    int num_entries;

} UPortList;


void SetupUnidecode();
void UnidecodeInit(u_char *);
void USetPorts(char *);
void UPreprocUrlDecode(Packet *);

#endif  /* __SPP_HTTP_DECODE_H__ */
-------------- next part --------------
#include "codes.h"

/************************************************
* Set the values
************************************************/
void init_codes(){
	int i;
	
	for (i=0;i<65536;i++)
		codes[i]=0x0;  /*question mark*/
	
	/*the first 128 entries are the same as ascii*/
	for (i=0;i<128;i++)
		codes[i] = i;
	
	codes[0x0081]=0x81; //?
	codes[0x0081]=0x81; //?
	codes[0x008d]=0x8d; //?
	codes[0x008d]=0x8d; //?
	codes[0x008f]=0x8f; //?
	codes[0x008f]=0x8f; //?
	codes[0x0090]=0x90; //?
	codes[0x0090]=0x90; //?
	codes[0x009d]=0x9d; //?
	codes[0x009d]=0x9d; //?
	codes[0x00a0]=0xa0; //?
	codes[0x00a0]=0xa0; //?
	codes[0x00a1]=0xa1; //?
	codes[0x00a1]=0xa1; //?
	codes[0x00a2]=0xa2; //?
	codes[0x00a2]=0xa2; //?
	codes[0x00a3]=0xa3; //?
	codes[0x00a3]=0xa3; //?
	codes[0x00a4]=0xa4; //?
	codes[0x00a4]=0xa4; //?
	codes[0x00a5]=0xa5; //?
	codes[0x00a5]=0xa5; //?
	codes[0x00a6]=0xa6; //?
	codes[0x00a6]=0xa6; //?
	codes[0x00a7]=0xa7; //?
	codes[0x00a7]=0xa7; //?
	codes[0x00a8]=0xa8; //?
	codes[0x00a8]=0xa8; //?
	codes[0x00a9]=0xa9; //?
	codes[0x00a9]=0xa9; //?
	codes[0x00aa]=0xaa; //?
	codes[0x00aa]=0xaa; //?
	codes[0x00ab]=0xab; //?
	codes[0x00ab]=0xab; //?
	codes[0x00ac]=0xac; //?
	codes[0x00ac]=0xac; //?
	codes[0x00ad]=0xad; //?
	codes[0x00ad]=0xad; //?
	codes[0x00ae]=0xae; //?
	codes[0x00ae]=0xae; //?
	codes[0x00af]=0xaf; //?
	codes[0x00af]=0xaf; //?
	codes[0x00b0]=0xb0; //?
	codes[0x00b0]=0xb0; //?
	codes[0x00b1]=0xb1; //?
	codes[0x00b1]=0xb1; //?
	codes[0x00b2]=0xb2; //?
	codes[0x00b2]=0xb2; //?
	codes[0x00b3]=0xb3; //?
	codes[0x00b3]=0xb3; //?
	codes[0x00b4]=0xb4; //?
	codes[0x00b4]=0xb4; //?
	codes[0x00b5]=0xb5; //?
	codes[0x00b5]=0xb5; //?
	codes[0x00b6]=0xb6; //?
	codes[0x00b6]=0xb6; //?
	codes[0x00b7]=0xb7; //?
	codes[0x00b7]=0xb7; //?
	codes[0x00b8]=0xb8; //?
	codes[0x00b8]=0xb8; //?
	codes[0x00b9]=0xb9; //?
	codes[0x00b9]=0xb9; //?
	codes[0x00ba]=0xba; //?
	codes[0x00ba]=0xba; //?
	codes[0x00bb]=0xbb; //?
	codes[0x00bb]=0xbb; //?
	codes[0x00bc]=0xbc; //?
	codes[0x00bc]=0xbc; //?
	codes[0x00bd]=0xbd; //?
	codes[0x00bd]=0xbd; //?
	codes[0x00be]=0xbe; //?
	codes[0x00be]=0xbe; //?
	codes[0x00bf]=0xbf; //?
	codes[0x00bf]=0xbf; //?
	codes[0x00c0]=0xc0; //?
	codes[0x00c0]=0xc0; //?
	codes[0x00c1]=0xc1; //?
	codes[0x00c1]=0xc1; //?
	codes[0x00c2]=0xc2; //?
	codes[0x00c2]=0xc2; //?
	codes[0x00c3]=0xc3; //?
	codes[0x00c3]=0xc3; //?
	codes[0x00c4]=0xc4; //?
	codes[0x00c4]=0xc4; //?
	codes[0x00c5]=0xc5; //?
	codes[0x00c5]=0xc5; //?
	codes[0x00c6]=0xc6; //?
	codes[0x00c6]=0xc6; //?
	codes[0x00c7]=0xc7; //?
	codes[0x00c7]=0xc7; //?
	codes[0x00c8]=0xc8; //?
	codes[0x00c8]=0xc8; //?
	codes[0x00c9]=0xc9; //?
	codes[0x00c9]=0xc9; //?
	codes[0x00ca]=0xca; //?
	codes[0x00ca]=0xca; //?
	codes[0x00cb]=0xcb; //?
	codes[0x00cb]=0xcb; //?
	codes[0x00cc]=0xcc; //?
	codes[0x00cc]=0xcc; //?
	codes[0x00cd]=0xcd; //?
	codes[0x00cd]=0xcd; //?
	codes[0x00ce]=0xce; //?
	codes[0x00ce]=0xce; //?
	codes[0x00cf]=0xcf; //?
	codes[0x00cf]=0xcf; //?
	codes[0x00d0]=0xd0; //?
	codes[0x00d0]=0xd0; //?
	codes[0x00d1]=0xd1; //?
	codes[0x00d1]=0xd1; //?
	codes[0x00d2]=0xd2; //?
	codes[0x00d2]=0xd2; //?
	codes[0x00d3]=0xd3; //?
	codes[0x00d3]=0xd3; //?
	codes[0x00d4]=0xd4; //?
	codes[0x00d4]=0xd4; //?
	codes[0x00d5]=0xd5; //?
	codes[0x00d5]=0xd5; //?
	codes[0x00d6]=0xd6; //?
	codes[0x00d6]=0xd6; //?
	codes[0x00d7]=0xd7; //?
	codes[0x00d7]=0xd7; //?
	codes[0x00d8]=0xd8; //?
	codes[0x00d8]=0xd8; //?
	codes[0x00d9]=0xd9; //?
	codes[0x00d9]=0xd9; //?
	codes[0x00da]=0xda; //?
	codes[0x00da]=0xda; //?
	codes[0x00db]=0xdb; //?
	codes[0x00db]=0xdb; //?
	codes[0x00dc]=0xdc; //?
	codes[0x00dc]=0xdc; //?
	codes[0x00dd]=0xdd; //?
	codes[0x00dd]=0xdd; //?
	codes[0x00de]=0xde; //?
	codes[0x00de]=0xde; //?
	codes[0x00df]=0xdf; //?
	codes[0x00df]=0xdf; //?
	codes[0x00e0]=0xe0; //?
	codes[0x00e0]=0xe0; //?
	codes[0x00e1]=0xe1; //?
	codes[0x00e1]=0xe1; //?
	codes[0x00e2]=0xe2; //?
	codes[0x00e2]=0xe2; //?
	codes[0x00e3]=0xe3; //?
	codes[0x00e3]=0xe3; //?
	codes[0x00e4]=0xe4; //?
	codes[0x00e4]=0xe4; //?
	codes[0x00e5]=0xe5; //?
	codes[0x00e5]=0xe5; //?
	codes[0x00e6]=0xe6; //?
	codes[0x00e6]=0xe6; //?
	codes[0x00e7]=0xe7; //?
	codes[0x00e7]=0xe7; //?
	codes[0x00e8]=0xe8; //?
	codes[0x00e8]=0xe8; //?
	codes[0x00e9]=0xe9; //?
	codes[0x00e9]=0xe9; //?
	codes[0x00ea]=0xea; //?
	codes[0x00ea]=0xea; //?
	codes[0x00eb]=0xeb; //?
	codes[0x00eb]=0xeb; //?
	codes[0x00ec]=0xec; //?
	codes[0x00ec]=0xec; //?
	codes[0x00ed]=0xed; //?
	codes[0x00ed]=0xed; //?
	codes[0x00ee]=0xee; //?
	codes[0x00ee]=0xee; //?
	codes[0x00ef]=0xef; //?
	codes[0x00ef]=0xef; //?
	codes[0x00f0]=0xf0; //?
	codes[0x00f0]=0xf0; //?
	codes[0x00f1]=0xf1; //?
	codes[0x00f1]=0xf1; //?
	codes[0x00f2]=0xf2; //?
	codes[0x00f2]=0xf2; //?
	codes[0x00f3]=0xf3; //?
	codes[0x00f3]=0xf3; //?
	codes[0x00f4]=0xf4; //?
	codes[0x00f4]=0xf4; //?
	codes[0x00f5]=0xf5; //?
	codes[0x00f5]=0xf5; //?
	codes[0x00f6]=0xf6; //?
	codes[0x00f6]=0xf6; //?
	codes[0x00f7]=0xf7; //?
	codes[0x00f7]=0xf7; //?
	codes[0x00f8]=0xf8; //?
	codes[0x00f8]=0xf8; //?
	codes[0x00f9]=0xf9; //?
	codes[0x00f9]=0xf9; //?
	codes[0x00fa]=0xfa; //?
	codes[0x00fa]=0xfa; //?
	codes[0x00fb]=0xfb; //?
	codes[0x00fb]=0xfb; //?
	codes[0x00fc]=0xfc; //?
	codes[0x00fc]=0xfc; //?
	codes[0x00fd]=0xfd; //?
	codes[0x00fd]=0xfd; //?
	codes[0x00fe]=0xfe; //?
	codes[0x00fe]=0xfe; //?
	codes[0x00ff]=0xff; //?
	codes[0x00ff]=0xff; //?
	codes[0x0100]=0x41; //A
	codes[0x0100]=0x41; //A
	codes[0x0101]=0x61; //a
	codes[0x0101]=0x61; //a
	codes[0x0102]=0x41; //A
	codes[0x0102]=0x41; //A
	codes[0x0103]=0x61; //a
	codes[0x0103]=0x61; //a
	codes[0x0104]=0x41; //A
	codes[0x0104]=0x41; //A
	codes[0x0105]=0x61; //a
	codes[0x0105]=0x61; //a
	codes[0x0106]=0x43; //C
	codes[0x0106]=0x43; //C
	codes[0x0107]=0x63; //c
	codes[0x0107]=0x63; //c
	codes[0x0108]=0x43; //C
	codes[0x0108]=0x43; //C
	codes[0x0109]=0x63; //c
	codes[0x0109]=0x63; //c
	codes[0x010a]=0x43; //C
	codes[0x010a]=0x43; //C
	codes[0x010b]=0x63; //c
	codes[0x010b]=0x63; //c
	codes[0x010c]=0x43; //C
	codes[0x010c]=0x43; //C
	codes[0x010d]=0x63; //c
	codes[0x010d]=0x63; //c
	codes[0x010e]=0x44; //D
	codes[0x010e]=0x44; //D
	codes[0x010f]=0x64; //d
	codes[0x010f]=0x64; //d
	codes[0x0110]=0xd0; //?
	codes[0x0110]=0xd0; //?
	codes[0x0111]=0x64; //d
	codes[0x0111]=0x64; //d
	codes[0x0112]=0x45; //E
	codes[0x0112]=0x45; //E
	codes[0x0113]=0x65; //e
	codes[0x0113]=0x65; //e
	codes[0x0114]=0x45; //E
	codes[0x0114]=0x45; //E
	codes[0x0115]=0x65; //e
	codes[0x0115]=0x65; //e
	codes[0x0116]=0x45; //E
	codes[0x0116]=0x45; //E
	codes[0x0117]=0x65; //e
	codes[0x0117]=0x65; //e
	codes[0x0118]=0x45; //E
	codes[0x0118]=0x45; //E
	codes[0x0119]=0x65; //e
	codes[0x0119]=0x65; //e
	codes[0x011a]=0x45; //E
	codes[0x011a]=0x45; //E
	codes[0x011b]=0x65; //e
	codes[0x011b]=0x65; //e
	codes[0x011c]=0x47; //G
	codes[0x011c]=0x47; //G
	codes[0x011d]=0x67; //g
	codes[0x011d]=0x67; //g
	codes[0x011e]=0x47; //G
	codes[0x011e]=0x47; //G
	codes[0x011f]=0x67; //g
	codes[0x011f]=0x67; //g
	codes[0x0120]=0x47; //G
	codes[0x0120]=0x47; //G
	codes[0x0121]=0x67; //g
	codes[0x0121]=0x67; //g
	codes[0x0122]=0x47; //G
	codes[0x0122]=0x47; //G
	codes[0x0123]=0x67; //g
	codes[0x0123]=0x67; //g
	codes[0x0124]=0x48; //H
	codes[0x0124]=0x48; //H
	codes[0x0125]=0x68; //h
	codes[0x0125]=0x68; //h
	codes[0x0126]=0x48; //H
	codes[0x0126]=0x48; //H
	codes[0x0127]=0x68; //h
	codes[0x0127]=0x68; //h
	codes[0x0128]=0x49; //I
	codes[0x0128]=0x49; //I
	codes[0x0129]=0x69; //i
	codes[0x0129]=0x69; //i
	codes[0x012a]=0x49; //I
	codes[0x012a]=0x49; //I
	codes[0x012b]=0x69; //i
	codes[0x012b]=0x69; //i
	codes[0x012c]=0x49; //I
	codes[0x012c]=0x49; //I
	codes[0x012d]=0x69; //i
	codes[0x012d]=0x69; //i
	codes[0x012e]=0x49; //I
	codes[0x012e]=0x49; //I
	codes[0x012f]=0x69; //i
	codes[0x012f]=0x69; //i
	codes[0x0130]=0x49; //I
	codes[0x0130]=0x49; //I
	codes[0x0131]=0x69; //i
	codes[0x0131]=0x69; //i
	codes[0x0134]=0x4a; //J
	codes[0x0134]=0x4a; //J
	codes[0x0135]=0x6a; //j
	codes[0x0135]=0x6a; //j
	codes[0x0136]=0x4b; //K
	codes[0x0136]=0x4b; //K
	codes[0x0137]=0x6b; //k
	codes[0x0137]=0x6b; //k
	codes[0x0139]=0x4c; //L
	codes[0x0139]=0x4c; //L
	codes[0x013a]=0x6c; //l
	codes[0x013a]=0x6c; //l
	codes[0x013b]=0x4c; //L
	codes[0x013b]=0x4c; //L
	codes[0x013c]=0x6c; //l
	codes[0x013c]=0x6c; //l
	codes[0x013d]=0x4c; //L
	codes[0x013d]=0x4c; //L
	codes[0x013e]=0x6c; //l
	codes[0x013e]=0x6c; //l
	codes[0x0141]=0x4c; //L
	codes[0x0141]=0x4c; //L
	codes[0x0142]=0x6c; //l
	codes[0x0142]=0x6c; //l
	codes[0x0143]=0x4e; //N
	codes[0x0143]=0x4e; //N
	codes[0x0144]=0x6e; //n
	codes[0x0144]=0x6e; //n
	codes[0x0145]=0x4e; //N
	codes[0x0145]=0x4e; //N
	codes[0x0146]=0x6e; //n
	codes[0x0146]=0x6e; //n
	codes[0x0147]=0x4e; //N
	codes[0x0147]=0x4e; //N
	codes[0x0148]=0x6e; //n
	codes[0x0148]=0x6e; //n
	codes[0x014c]=0x4f; //O
	codes[0x014c]=0x4f; //O
	codes[0x014d]=0x6f; //o
	codes[0x014d]=0x6f; //o
	codes[0x014e]=0x4f; //O
	codes[0x014e]=0x4f; //O
	codes[0x014f]=0x6f; //o
	codes[0x014f]=0x6f; //o
	codes[0x0150]=0x4f; //O
	codes[0x0150]=0x4f; //O
	codes[0x0151]=0x6f; //o
	codes[0x0151]=0x6f; //o
	codes[0x0152]=0x8c; //?
	codes[0x0152]=0x8c; //?
	codes[0x0153]=0x9c; //?
	codes[0x0153]=0x9c; //?
	codes[0x0154]=0x52; //R
	codes[0x0154]=0x52; //R
	codes[0x0155]=0x72; //r
	codes[0x0155]=0x72; //r
	codes[0x0156]=0x52; //R
	codes[0x0156]=0x52; //R
	codes[0x0157]=0x72; //r
	codes[0x0157]=0x72; //r
	codes[0x0158]=0x52; //R
	codes[0x0158]=0x52; //R
	codes[0x0159]=0x72; //r
	codes[0x0159]=0x72; //r
	codes[0x015a]=0x53; //S
	codes[0x015a]=0x53; //S
	codes[0x015b]=0x73; //s
	codes[0x015b]=0x73; //s
	codes[0x015c]=0x53; //S
	codes[0x015c]=0x53; //S
	codes[0x015d]=0x73; //s
	codes[0x015d]=0x73; //s
	codes[0x015e]=0x53; //S
	codes[0x015e]=0x53; //S
	codes[0x015f]=0x73; //s
	codes[0x015f]=0x73; //s
	codes[0x0160]=0x8a; //?
	codes[0x0160]=0x8a; //?
	codes[0x0161]=0x9a; //?
	codes[0x0161]=0x9a; //?
	codes[0x0162]=0x54; //T
	codes[0x0162]=0x54; //T
	codes[0x0163]=0x74; //t
	codes[0x0163]=0x74; //t
	codes[0x0164]=0x54; //T
	codes[0x0164]=0x54; //T
	codes[0x0165]=0x74; //t
	codes[0x0165]=0x74; //t
	codes[0x0166]=0x54; //T
	codes[0x0166]=0x54; //T
	codes[0x0167]=0x74; //t
	codes[0x0167]=0x74; //t
	codes[0x0168]=0x55; //U
	codes[0x0168]=0x55; //U
	codes[0x0169]=0x75; //u
	codes[0x0169]=0x75; //u
	codes[0x016a]=0x55; //U
	codes[0x016a]=0x55; //U
	codes[0x016b]=0x75; //u
	codes[0x016b]=0x75; //u
	codes[0x016c]=0x55; //U
	codes[0x016c]=0x55; //U
	codes[0x016d]=0x75; //u
	codes[0x016d]=0x75; //u
	codes[0x016e]=0x55; //U
	codes[0x016e]=0x55; //U
	codes[0x016f]=0x75; //u
	codes[0x016f]=0x75; //u
	codes[0x0170]=0x55; //U
	codes[0x0170]=0x55; //U
	codes[0x0171]=0x75; //u
	codes[0x0171]=0x75; //u
	codes[0x0172]=0x55; //U
	codes[0x0172]=0x55; //U
	codes[0x0173]=0x75; //u
	codes[0x0173]=0x75; //u
	codes[0x0174]=0x57; //W
	codes[0x0174]=0x57; //W
	codes[0x0175]=0x77; //w
	codes[0x0175]=0x77; //w
	codes[0x0176]=0x59; //Y
	codes[0x0176]=0x59; //Y
	codes[0x0177]=0x79; //y
	codes[0x0177]=0x79; //y
	codes[0x0178]=0x9f; //?
	codes[0x0178]=0x9f; //?
	codes[0x0179]=0x5a; //Z
	codes[0x0179]=0x5a; //Z
	codes[0x017a]=0x7a; //z
	codes[0x017a]=0x7a; //z
	codes[0x017b]=0x5a; //Z
	codes[0x017b]=0x5a; //Z
	codes[0x017c]=0x7a; //z
	codes[0x017c]=0x7a; //z
	codes[0x017d]=0x8e; //?
	codes[0x017d]=0x8e; //?
	codes[0x017e]=0x9e; //?
	codes[0x017e]=0x9e; //?
	codes[0x0180]=0x62; //b
	codes[0x0180]=0x62; //b
	codes[0x0189]=0xd0; //?
	codes[0x0189]=0xd0; //?
	codes[0x0191]=0x83; //?
	codes[0x0191]=0x83; //?
	codes[0x0192]=0x83; //?
	codes[0x0192]=0x83; //?
	codes[0x0197]=0x49; //I
	codes[0x0197]=0x49; //I
	codes[0x019a]=0x6c; //l
	codes[0x019a]=0x6c; //l
	codes[0x019f]=0x4f; //O
	codes[0x019f]=0x4f; //O
	codes[0x01a0]=0x4f; //O
	codes[0x01a0]=0x4f; //O
	codes[0x01a1]=0x6f; //o
	codes[0x01a1]=0x6f; //o
	codes[0x01ab]=0x74; //t
	codes[0x01ab]=0x74; //t
	codes[0x01ae]=0x54; //T
	codes[0x01ae]=0x54; //T
	codes[0x01af]=0x55; //U
	codes[0x01af]=0x55; //U
	codes[0x01b0]=0x75; //u
	codes[0x01b0]=0x75; //u
	codes[0x01b6]=0x7a; //z
	codes[0x01b6]=0x7a; //z
	codes[0x01c0]=0x7c; //|
	codes[0x01c0]=0x7c; //|
	codes[0x01c3]=0x21; //!
	codes[0x01c3]=0x21; //!
	codes[0x01cd]=0x41; //A
	codes[0x01cd]=0x41; //A
	codes[0x01ce]=0x61; //a
	codes[0x01ce]=0x61; //a
	codes[0x01cf]=0x49; //I
	codes[0x01cf]=0x49; //I
	codes[0x01d0]=0x69; //i
	codes[0x01d0]=0x69; //i
	codes[0x01d1]=0x4f; //O
	codes[0x01d1]=0x4f; //O
	codes[0x01d2]=0x6f; //o
	codes[0x01d2]=0x6f; //o
	codes[0x01d3]=0x55; //U
	codes[0x01d3]=0x55; //U
	codes[0x01d4]=0x75; //u
	codes[0x01d4]=0x75; //u
	codes[0x01d5]=0x55; //U
	codes[0x01d5]=0x55; //U
	codes[0x01d6]=0x75; //u
	codes[0x01d6]=0x75; //u
	codes[0x01d7]=0x55; //U
	codes[0x01d7]=0x55; //U
	codes[0x01d8]=0x75; //u
	codes[0x01d8]=0x75; //u
	codes[0x01d9]=0x55; //U
	codes[0x01d9]=0x55; //U
	codes[0x01da]=0x75; //u
	codes[0x01da]=0x75; //u
	codes[0x01db]=0x55; //U
	codes[0x01db]=0x55; //U
	codes[0x01dc]=0x75; //u
	codes[0x01dc]=0x75; //u
	codes[0x01de]=0x41; //A
	codes[0x01de]=0x41; //A
	codes[0x01df]=0x61; //a
	codes[0x01df]=0x61; //a
	codes[0x01e4]=0x47; //G
	codes[0x01e4]=0x47; //G
	codes[0x01e5]=0x67; //g
	codes[0x01e5]=0x67; //g
	codes[0x01e6]=0x47; //G
	codes[0x01e6]=0x47; //G
	codes[0x01e7]=0x67; //g
	codes[0x01e7]=0x67; //g
	codes[0x01e8]=0x4b; //K
	codes[0x01e8]=0x4b; //K
	codes[0x01e9]=0x6b; //k
	codes[0x01e9]=0x6b; //k
	codes[0x01ea]=0x4f; //O
	codes[0x01ea]=0x4f; //O
	codes[0x01eb]=0x6f; //o
	codes[0x01eb]=0x6f; //o
	codes[0x01ec]=0x4f; //O
	codes[0x01ec]=0x4f; //O
	codes[0x01ed]=0x6f; //o
	codes[0x01ed]=0x6f; //o
	codes[0x01f0]=0x6a; //j
	codes[0x01f0]=0x6a; //j
	codes[0x0261]=0x67; //g
	codes[0x0261]=0x67; //g
	codes[0x02b9]=0x27; //'
	codes[0x02b9]=0x27; //'
	codes[0x02ba]=0x22; //"
	codes[0x02ba]=0x22; //"
	codes[0x02bc]=0x27; //'
	codes[0x02bc]=0x27; //'
	codes[0x02c4]=0x5e; //^
	codes[0x02c4]=0x5e; //^
	codes[0x02c6]=0x88; //?
	codes[0x02c6]=0x88; //?
	codes[0x02c8]=0x27; //'
	codes[0x02c8]=0x27; //'
	codes[0x02c9]=0xaf; //?
	codes[0x02c9]=0xaf; //?
	codes[0x02ca]=0xb4; //?
	codes[0x02ca]=0xb4; //?
	codes[0x02cb]=0x60; //`
	codes[0x02cb]=0x60; //`
	codes[0x02cd]=0x5f; //_
	codes[0x02cd]=0x5f; //_
	codes[0x02da]=0xb0; //?
	codes[0x02da]=0xb0; //?
	codes[0x02dc]=0x98; //?
	codes[0x02dc]=0x98; //?
	codes[0x0300]=0x60; //`
	codes[0x0300]=0x60; //`
	codes[0x0301]=0xb4; //?
	codes[0x0301]=0xb4; //?
	codes[0x0302]=0x5e; //^
	codes[0x0302]=0x5e; //^
	codes[0x0303]=0x7e; //~
	codes[0x0303]=0x7e; //~
	codes[0x0304]=0xaf; //?
	codes[0x0304]=0xaf; //?
	codes[0x0305]=0xaf; //?
	codes[0x0305]=0xaf; //?
	codes[0x0308]=0xa8; //?
	codes[0x0308]=0xa8; //?
	codes[0x030a]=0xb0; //?
	codes[0x030a]=0xb0; //?
	codes[0x030e]=0x22; //"
	codes[0x030e]=0x22; //"
	codes[0x0327]=0xb8; //?
	codes[0x0327]=0xb8; //?
	codes[0x0331]=0x5f; //_
	codes[0x0331]=0x5f; //_
	codes[0x0332]=0x5f; //_
	codes[0x0332]=0x5f; //_
	codes[0x037e]=0x3b; //;
	codes[0x037e]=0x3b; //;
	codes[0x0393]=0x47; //G
	codes[0x0393]=0x47; //G
	codes[0x0398]=0x54; //T
	codes[0x0398]=0x54; //T
	codes[0x03a3]=0x53; //S
	codes[0x03a3]=0x53; //S
	codes[0x03a6]=0x46; //F
	codes[0x03a6]=0x46; //F
	codes[0x03a9]=0x4f; //O
	codes[0x03a9]=0x4f; //O
	codes[0x03b1]=0x61; //a
	codes[0x03b1]=0x61; //a
	codes[0x03b2]=0xdf; //?
	codes[0x03b2]=0xdf; //?
	codes[0x03b4]=0x64; //d
	codes[0x03b4]=0x64; //d
	codes[0x03b5]=0x65; //e
	codes[0x03b5]=0x65; //e
	codes[0x03bc]=0xb5; //?
	codes[0x03bc]=0xb5; //?
	codes[0x03c0]=0x70; //p
	codes[0x03c0]=0x70; //p
	codes[0x03c3]=0x73; //s
	codes[0x03c3]=0x73; //s
	codes[0x03c4]=0x74; //t
	codes[0x03c4]=0x74; //t
	codes[0x03c6]=0x66; //f
	codes[0x03c6]=0x66; //f
	codes[0x04bb]=0x68; //h
	codes[0x04bb]=0x68; //h
	codes[0x0589]=0x3a; //:
	codes[0x0589]=0x3a; //:
	codes[0x066a]=0x25; //%
	codes[0x066a]=0x25; //%
	codes[0x2000]=0x2b; //+
	codes[0x2001]=0x2b; //+
	codes[0x2002]=0x2b; //+
	codes[0x2003]=0x2b; //+
	codes[0x2004]=0x2b; //+
	codes[0x2005]=0x2b; //+
	codes[0x2006]=0x2b; //+
	codes[0x2010]=0x2d; //-
	codes[0x2011]=0x2d; //-
	codes[0x2013]=0x96; //?
	codes[0x2014]=0x97; //?
	codes[0x2017]=0x3d; //=
	codes[0x2018]=0x91; //?
	codes[0x2019]=0x92; //?
	codes[0x201a]=0x82; //?
	codes[0x201c]=0x93; //?
	codes[0x201d]=0x94; //?
	codes[0x201e]=0x84; //?
	codes[0x2020]=0x86; //?
	codes[0x2021]=0x87; //?
	codes[0x2022]=0x95; //?
	codes[0x2024]=0xb7; //?
	codes[0x2026]=0x85; //?
	codes[0x2030]=0x89; //?
	codes[0x2032]=0x27; //'
	codes[0x2035]=0x60; //`
	codes[0x2039]=0x8b; //?
	codes[0x203a]=0x9b; //?
	codes[0x2044]=0x2f; ///
	codes[0x2070]=0xb0; //?
	codes[0x2074]=0x34; //4
	codes[0x2075]=0x35; //5
	codes[0x2076]=0x36; //6
	codes[0x2077]=0x37; //7
	codes[0x2078]=0x38; //8
	codes[0x207f]=0x6e; //n
	codes[0x2080]=0x30; //0
	codes[0x2081]=0x31; //1
	codes[0x2082]=0x32; //2
	codes[0x2083]=0x33; //3
	codes[0x2084]=0x34; //4
	codes[0x2085]=0x35; //5
	codes[0x2086]=0x36; //6
	codes[0x2087]=0x37; //7
	codes[0x2088]=0x38; //8
	codes[0x2089]=0x39; //9
	codes[0x20a1]=0xa2; //?
	codes[0x20a4]=0xa3; //?
	codes[0x20a7]=0x50; //P
	codes[0x20ac]=0x80; //?
	codes[0x2102]=0x43; //C
	codes[0x2107]=0x45; //E
	codes[0x210a]=0x67; //g
	codes[0x210b]=0x48; //H
	codes[0x210c]=0x48; //H
	codes[0x210d]=0x48; //H
	codes[0x210e]=0x68; //h
	codes[0x2110]=0x49; //I
	codes[0x2111]=0x49; //I
	codes[0x2112]=0x4c; //L
	codes[0x2113]=0x6c; //l
	codes[0x2115]=0x4e; //N
	codes[0x2118]=0x50; //P
	codes[0x2119]=0x50; //P
	codes[0x211a]=0x51; //Q
	codes[0x211b]=0x52; //R
	codes[0x211c]=0x52; //R
	codes[0x211d]=0x52; //R
	codes[0x2122]=0x99; //?
	codes[0x2124]=0x5a; //Z
	codes[0x2128]=0x5a; //Z
	codes[0x212a]=0x4b; //K
	codes[0x212b]=0xc5; //?
	codes[0x212c]=0x42; //B
	codes[0x212d]=0x43; //C
	codes[0x212e]=0x65; //e
	codes[0x212f]=0x65; //e
	codes[0x2130]=0x45; //E
	codes[0x2131]=0x46; //F
	codes[0x2133]=0x4d; //M
	codes[0x2134]=0x6f; //o
	codes[0x2205]=0xd8; //?
	codes[0x2212]=0x2d; //-
	codes[0x2213]=0xb1; //?
	codes[0x2215]=0x2f; // /
	codes[0x2216]=0x5c; /* \ */
	codes[0x2217]=0x2a; // *
	codes[0x2218]=0xb0; //?
	codes[0x2219]=0xb7; //?
	codes[0x221a]=0x76; //v
	codes[0x221e]=0x38; //8
	codes[0x2223]=0x7c; //|
	codes[0x2229]=0x6e; //n
	codes[0x2236]=0x3a; //:
	codes[0x223c]=0x7e; //~
	codes[0x2248]=0x98; //?
	codes[0x2261]=0x3d; //=
	codes[0x2264]=0x3d; //=
	codes[0x2265]=0x3d; //=
	codes[0x226a]=0xab; //?
	codes[0x226b]=0xbb; //?
	codes[0x22c5]=0xb7; //?
	codes[0x2302]=0xa6; //?
	codes[0x2303]=0x5e; //^
	codes[0x2310]=0xac; //?
	codes[0x2320]=0x28; //(
	codes[0x2321]=0x29; //)
	codes[0x2329]=0x3c; //<
	codes[0x232a]=0x3e; //>
	codes[0x2500]=0x2d; //-
	codes[0x2502]=0xa6; //?
	codes[0x250c]=0x2b; //+
	codes[0x2510]=0x2b; //+
	codes[0x2514]=0x2b; //+
	codes[0x2518]=0x2b; //+
	codes[0x251c]=0x2b; //+
	codes[0x2524]=0xa6; //?
	codes[0x252c]=0x2d; //-
	codes[0x2534]=0x2d; //-
	codes[0x253c]=0x2b; //+
	codes[0x2550]=0x2d; //-
	codes[0x2551]=0xa6; //?
	codes[0x2552]=0x2b; //+
	codes[0x2553]=0x2b; //+
	codes[0x2554]=0x2b; //+
	codes[0x2555]=0x2b; //+
	codes[0x2556]=0x2b; //+
	codes[0x2557]=0x2b; //+
	codes[0x2558]=0x2b; //+
	codes[0x2559]=0x2b; //+
	codes[0x255a]=0x2b; //+
	codes[0x255b]=0x2b; //+
	codes[0x255c]=0x2b; //+
	codes[0x255d]=0x2b; //+
	codes[0x255e]=0xa6; //?
	codes[0x255f]=0xa6; //?
	codes[0x2560]=0xa6; //?
	codes[0x2561]=0xa6; //?
	codes[0x2562]=0xa6; //?
	codes[0x2563]=0xa6; //?
	codes[0x2564]=0x2d; //-
	codes[0x2565]=0x2d; //-
	codes[0x2566]=0x2d; //-
	codes[0x2567]=0x2d; //-
	codes[0x2568]=0x2d; //-
	codes[0x2569]=0x2d; //-
	codes[0x256a]=0x2b; //+
	codes[0x256b]=0x2b; //+
	codes[0x256c]=0x2b; //+
	codes[0x2580]=0xaf; //?
	codes[0x2584]=0x5f; //_
	codes[0x2588]=0xa6; //?
	codes[0x258c]=0xa6; //?
	codes[0x2590]=0xa6; //?
	codes[0x2591]=0xa6; //?
	codes[0x2592]=0xa6; //?
	codes[0x2593]=0xa6; //?
	codes[0x25a0]=0xa6; //?
	codes[0x263c]=0xa4; //?
	codes[0x2758]=0x7c; //|
	codes[0x3000]=0x2b; //+
	codes[0x3008]=0x3c; //<
	codes[0x3009]=0x3e; //>
	codes[0x300a]=0xab; //?
	codes[0x300b]=0xbb; //?
	codes[0x301a]=0x5b; //[
	codes[0x301b]=0x5d; //]
	codes[0x30fb]=0xb7; //?
	codes[0xff01]=0x21; //!
	codes[0xff02]=0x22; //"
	codes[0xff03]=0x23; //#
	codes[0xff04]=0x24; //$
	codes[0xff05]=0x25; //%
	codes[0xff06]=0x26; //&
	codes[0xff07]=0x27; //'
	codes[0xff08]=0x28; //(
	codes[0xff09]=0x29; //)
	codes[0xff0a]=0x2a; // *
	codes[0xff0b]=0x2b; //+
	codes[0xff0c]=0x2c; //,
	codes[0xff0d]=0x2d; //-
	codes[0xff0e]=0x2e; //.
	codes[0xff0f]=0x2f; ///
	codes[0xff10]=0x30; //0
	codes[0xff11]=0x31; //1
	codes[0xff12]=0x32; //2
	codes[0xff13]=0x33; //3
	codes[0xff14]=0x34; //4
	codes[0xff15]=0x35; //5
	codes[0xff16]=0x36; //6
	codes[0xff17]=0x37; //7
	codes[0xff18]=0x38; //8
	codes[0xff19]=0x39; //9
	codes[0xff1a]=0x3a; //:
	codes[0xff1b]=0x3b; //;
	codes[0xff1c]=0x3c; //<
	codes[0xff1d]=0x3d; //=
	codes[0xff1e]=0x3e; //>
	codes[0xff20]=0x40; //@
	codes[0xff21]=0x41; //A
	codes[0xff22]=0x42; //B
	codes[0xff23]=0x43; //C
	codes[0xff24]=0x44; //D
	codes[0xff25]=0x45; //E
	codes[0xff26]=0x46; //F
	codes[0xff27]=0x47; //G
	codes[0xff28]=0x48; //H
	codes[0xff29]=0x49; //I
	codes[0xff2a]=0x4a; //J
	codes[0xff2b]=0x4b; //K
	codes[0xff2c]=0x4c; //L
	codes[0xff2d]=0x4d; //M
	codes[0xff2e]=0x4e; //N
	codes[0xff2f]=0x4f; //O
	codes[0xff30]=0x50; //P
	codes[0xff31]=0x51; //Q
	codes[0xff32]=0x52; //R
	codes[0xff33]=0x53; //S
	codes[0xff34]=0x54; //T
	codes[0xff35]=0x55; //U
	codes[0xff36]=0x56; //V
	codes[0xff37]=0x57; //W
	codes[0xff38]=0x58; //X
	codes[0xff39]=0x59; //Y
	codes[0xff3a]=0x5a; //Z
	codes[0xff3b]=0x5b; //[
	codes[0xff3c]=0x5c; /* \ */
	codes[0xff3d]=0x5d; //]
	codes[0xff3e]=0x5e; //^
	codes[0xff3f]=0x5f; //_
	codes[0xff40]=0x60; //`
	codes[0xff41]=0x61; //a
	codes[0xff42]=0x62; //b
	codes[0xff43]=0x63; //c
	codes[0xff44]=0x64; //d
	codes[0xff45]=0x65; //e
	codes[0xff46]=0x66; //f
	codes[0xff47]=0x67; //g
	codes[0xff48]=0x68; //h
	codes[0xff49]=0x69; //i
	codes[0xff4a]=0x6a; //j
	codes[0xff4b]=0x6b; //k
	codes[0xff4c]=0x6c; //l
	codes[0xff4d]=0x6d; //m
	codes[0xff4e]=0x6e; //n
	codes[0xff4f]=0x6f; //o
	codes[0xff50]=0x70; //p
	codes[0xff51]=0x71; //q
	codes[0xff52]=0x72; //r
	codes[0xff53]=0x73; //s
	codes[0xff54]=0x74; //t
	codes[0xff55]=0x75; //u
	codes[0xff56]=0x76; //v
	codes[0xff57]=0x77; //w
	codes[0xff58]=0x78; //x
	codes[0xff59]=0x79; //y
	codes[0xff5a]=0x7a; //z
	codes[0xff5b]=0x7b; //{
	codes[0xff5c]=0x7c; //|
	codes[0xff5d]=0x7d; //}
	codes[0xff5e]=0x7e; //~
}
-------------- next part --------------

#ifndef __unidecode_codes_h
#define __unidecode_codes_h

char codes[65536];


void init_codes();


#endif


More information about the Snort-devel mailing list