#!/usr/bin/perl -W

##############################################################################
# edict - Your personal command line dictionary
#
# Copyright (c) 2002-2003 Vishal Verma <vermavee@users.sf.net>. 
# All rights reserved.
# 
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# ChangeLog is maintained as a separate file.
#
##############################################################################

use Socket;
use Getopt::Std;
use strict;
use Text::Wrap;
$Text::Wrap::columns = 80;

# this is just a temporary fix for perl 5.8.0. 5.8.1 won't need this
use bytes;

# error codes returned by gethostbyname: BUG 769932
my @netdb_errors = (	'Success',
			'Host not found!',
			'Non-authoritative - host not found',
			'Non-recoverable errors',
			'Valid name, no data record of requested type',
			'Internal error' # actually -1. Yes, it's a hack! :)
		);
						


# sub prototypes
sub edict_parse_cmdline();
sub edict_read_config();
sub edict_lookup($$$$);
sub edict_indexof($$);
sub edict_parse_response($$$);
sub edict_show_suggestions($$$);
sub edict_http_send_and_recv($);
sub edict_edict();
sub edict_list_dictionaries();
sub edict_print_centered($);
sub edict_sugg_trim($$);
sub edict_print_centered($);
sub edict_html2plain($);
sub edict_rid_chunked($);

# global vars
my $version = '2.2';
our ($opt_c, $opt_p, $opt_l, $opt_d, $opt_i, $opt_o, $opt_n);
my %digraph;
my $read_from_stdin = 0; # whether to read the HTTP response from the stdin
my $save_to_file;	# name of the file to save the HTTP response recd.

# Configuration files
use constant EDICT_CONF_FILE	=> '.edictrc';
use constant EDICT_UNIX_CONF	=> "/etc/".EDICT_CONF_FILE;
use constant EDICT_UNIX_USER_CONF => exists($ENV{HOME}) ? 
	"$ENV{HOME}/".EDICT_CONF_FILE : '';
#use constant EDICT_WIN_CONF	=> (-d 'C:\\WINDOWS' ? 
#	'C:\\WINDOWS\\system32\\' : 'C:\\WINNT\\').EDICT_CONF_FILE;
use constant EDICT_WIN_CONF	=> exists($ENV{SYSTEMROOT}) ?
	$ENV{SYSTEMROOT}.'\\'.EDICT_CONF_FILE : '';
use constant EDICT_WIN_USER_CONF=> exists($ENV{USERPROFILE}) ?
	$ENV{USERPROFILE}.'\\'.EDICT_CONF_FILE : '';

# default server, to send HTTP request to. Command line switches may override.
my $proxy_server;
# port, if specified by the user
my $proxy_port;

# Whether the dictionary should offer suggestions (if available), or not
my $suggest = 1;
my $nsugg = 2;		# how many suggestions to offer by default

# Whether to use color or not
my $color = 1;

# Sample HTTP request for use by various dictionaries
my @http_request = ('METHOD',
	#'Proxy-Connection: Keep-Alive',
	'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*',
	'REFERER',
	'Accept-Language: en-us',
	'Content-Type: application/x-www-form-urlencoded',
	'Accept-Encoding: text/html',
	'User-Agent: Mozilla/5.0',
	'HOST',
	'CONTENTLEN',
	'Connection: Close',
	'Cache-Control: no-cache',
	'',
	'CONTENT'
);

# constants; these are closely related to the request above
my $http_method		= edict_indexof(\@http_request, 'METHOD');
my $http_referer	= edict_indexof(\@http_request, 'REFERER');
my $http_host		= edict_indexof(\@http_request, 'HOST');
my $http_content_len	= edict_indexof(\@http_request, 'CONTENTLEN');
my $http_content	= edict_indexof(\@http_request, 'CONTENT');




#############  Define each dictionary specific data here #############
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# m-w dictionary
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my %mwdict = (
	'TITLE' => 'Merriam Webster Online Dictionary',
	'CREATE_REQUEST' => \&mw_create_request,
	'PARSE_RESPONSE' => \&mw_parse_response,
	'GET_SUGGESTIONS' => \&mw_get_suggestions,
);

# m-w thesaurus
my %mwthes = (
	'TITLE' => 'Merriam Webster Online Thesaurus',
	'CREATE_REQUEST' => \&mw_create_request,
	'PARSE_RESPONSE' => \&mw_parse_response,
	'GET_SUGGESTIONS' => \&mw_get_suggestions,
	);

# m-w function prototypes
sub mw_create_request($$$);
sub mw_create_content($);
sub mw_parse_response($$$);
sub mw_get_suggestions($$$);


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# dictionary.com definitions
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my %dictionarydotcom = (
	'TITLE' => 'www.dictionary.com',
	'CREATE_REQUEST' => \&dictionarydotcom_create_request,
	'PARSE_RESPONSE' => \&dictionarydotcom_parse_response,
	'GET_SUGGESTIONS' => \&dictionarydotcom_get_suggestions,
	);

my %thesaurusdotcom = (
	'TITLE' => 'www.thesaurus.com',
	'CREATE_REQUEST' => \&dictionarydotcom_create_request,
	'PARSE_RESPONSE' => \&dictionarydotcom_parse_response,
	'GET_SUGGESTIONS' => \&dictionarydotcom_get_suggestions,
	);

# dictionary.com functions
sub dictionarydotcom_create_request($$$);
sub dictionarydotcom_parse_response($$$);
sub dictionarydotcom_get_suggestions($$$);



# List of dictionaries. Add your own below.
my %dicts = (
	'mwdict', \%mwdict,
	'mwthes', \%mwthes,
	#'dictionary.com', \%dictionarydotcom,
	#'thesaurus.com', \%thesaurusdotcom,
	);


# Default dictionary to use. Command line/Config options may override this OR 
# you may change it here. The assigned values should be one of the keys of hash
# %dicts which is defined above.
my $cur_dict = 'mwdict';
if ($0 =~ /ethes$/) {
	$cur_dict = 'mwthes';
}







##############################################################################
#                           MAIN program                                     #
##############################################################################

$0 =~ s/^.*\///o;
$0 =~ s/^.*\\//o;	# Win32: Bug [ 756309 ] Don't show full path in usage

# read configuration file
edict_read_config;

print "edict - Your personal command line dictionary. Version $version.\n";
# parse the command line options
edict_parse_cmdline;

if (defined $opt_l) {
	edict_list_dictionaries;
} elsif (@ARGV <= 0) {
	die "Usage:\n    $0 [-cl] [-p proxy:port] [-d <dict>] <word1> [ <word2> ] ...\n";
} else {
	if (defined $opt_i) {
		$read_from_stdin = 1;
	}
	edict_edict;
}





# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#			Lookup functions
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

##############################################################################
# edict_indexof
#
# finds the index of given element in a given array. The elements are assumed
# to be strings.
##############################################################################

sub edict_indexof($$)
{
	my $list = shift;
	my $word = shift;

	my $not_found = 1;
	return grep {$not_found &= $word ne $_} @{$list};
}




##############################################################################
# edict_parse_cmdline
#
# parses command line options and sets up various variables accordingly
##############################################################################

sub edict_parse_cmdline()
{
	getopts('clinp:d:o:');
	if (defined $opt_p) {
		# if user specified just a port
		if ($opt_p =~ /^\d+$/) {
			$proxy_port = $opt_p;
		} elsif ($opt_p =~ /\w+:\d+/) { # user specified host & port
			# split host:port into host & port
			($proxy_server, $proxy_port) = split /:/, $opt_p;
		} else {
			$proxy_server = $opt_p;
		}
	}

	if (defined $opt_d) {
		# see if the dictionary exists
		if (defined $dicts{$opt_d}) {
			$cur_dict = $opt_d;
		} else {
			$cur_dict = undef;
			print STDERR "Dictionary \"$opt_d\" not found!\nedict -l shows a list of available dictionaries\n";
		}
	}

	if (defined $opt_o) {
		$save_to_file = $opt_o;
	}

	if (defined $opt_c) {
		$color = 0;
	}

	# RFE 922682 - provide a no suggestions option
	if (defined $opt_n) {
		$suggest = 0;
	}
}




##############################################################################
# edict_edict
#
# performs lookup for all the words specified on the commandline
##############################################################################
sub edict_edict()
{
	edict_lookup(shift(@ARGV), $cur_dict, $suggest, $nsugg);
	foreach (@ARGV) {
		print "----------------------------------------------------------\n";
		edict_lookup($_, $cur_dict, $suggest, $nsugg);
	}
}




##############################################################################
# edict_lookup
#
# looks up the given word in given dictionary for meaning
##############################################################################

sub edict_lookup($$$$)
{
	my $C = {};			# the context

	# the word and the dict to look it up in
	($C->{word}, $C->{dict}) = (shift, shift);

	return unless defined $C->{dict};

	# whether to show suggestions or not. If not, how many suggestions
	my ($suggest, $nsugg) = @_;
	# other local vars
	my (@suggestions, $choice);
	my $start = 0;

	while (1) {

		# create the HTTP request
		my $req = &{$dicts{$C->{dict}}{'CREATE_REQUEST'}}
				($start, $nsugg, $C);

		print "Looking up \"$C->{word}\" in $dicts{$C->{dict}}->{TITLE}...\n" if defined $req;

		# Send the HTTP request
		#print defined $req ? join("\n", @{$req}) : "undef", "\n";
		$C->{response} = edict_http_send_and_recv($req);

		# if we got a response, parse it
		edict_parse_response($start, $nsugg, $C);

		# stop if we are not supposed to offer suggestions
		last unless $suggest;
			
		my $suggestions = &{$dicts{$C->{dict}}{'GET_SUGGESTIONS'}}
							($start, $nsugg, $C);
		#print "# of suggestions: "; 
		#print defined $suggestions ? scalar(@{$suggestions}) : 
				#'undef', "\n";

		# delete the word, as we are no longer requesting the word
		# meaning if user chooses a suggestion below, it will be set up
		# again
		delete $C->{word};

		# if suggestions is 'undef', we need to do another iteration to
		# find out the suggestions
		next unless defined $suggestions;

		# stop if no suggestions were available
		last unless @{$suggestions};

		# trim suggestions, if greater than requested
		splice @{$suggestions}, $nsugg if @{$suggestions} > $nsugg;

		# show suggestions
		edict_show_suggestions($start, $suggestions,
						$C->{nsuggestions});

		print "Your choice: ";
		# accept user input
		$choice = <STDIN>;
		last unless defined $choice;
		chomp $choice;
	
		# user chose one of the sugggestions
		if ($choice =~ /^\d+$/o) {
			--$choice;
			#print "start: $start, choice: $choice, ", scalar(@{$suggestions}), "\n";
			last unless $choice >= $start && 
				$choice < $start + @{$suggestions};
			$C->{word} = $suggestions->[$choice - $start];
			next;
		} elsif ($choice eq 'n') {	# next page of suggestions
			$start += $nsugg;
		} elsif ($choice eq 'p') {
			$start -= $nsugg;
		} elsif ($choice =~ /^g(\d+)$/o) {
			$start = $1 - 1;
		} else {
			last;
		}

		$start = 0 if $start < 0;
		#print "Going to next iteration with start: $start\n";
	}
}


##############################################################################
# edict_parse_response
#
# parses the response and takes actions based on whether it was successful
# or not
##############################################################################
sub edict_parse_response($$$)
{
	my ($start, $nsugg, $C) = @_;

	# undefined response => no parsing
	return unless defined $C->{response};

	# parse it
	&{$dicts{$cur_dict}->{'PARSE_RESPONSE'}}($start, $nsugg, $C);
	my $response = ${$C->{response}};

	if (defined $response) {	# display it
		$response = wrap('', '', $response);
		print $response, "\n";
	} else {
		# [ 697431 ] edict shows wrong error message for valid words in
		# thesaurus
		if ($C->{dict} eq 'mwthes') {
			print "No thesaurus entries found for $C->{word}.\n";
		} else {
			print "Don't understand Swahili words like " .
				"$C->{word} ;)!!\n";
		}
	}
}


##############################################################################
# edict_show_suggestions
#
# Displays given suggestions
##############################################################################
sub edict_show_suggestions($$$)
{
	my ($start, $suggestions, $nsuggestions) = @_;
	my $page_info = "[".($start + 1)."-".($start + @{$suggestions}).
			" of $nsuggestions]";
	print " ------------------------------------------------------------------------------\n";
	edict_print_centered("Suggestions/Alternative meanings ".$page_info);
	print " ------------------------------------------------------------------------------\n";
	# print items two at a time
	my $i;
	for ($i = 1; $i < @{$suggestions}; $i += 2) {
		printf "%2d) %-35s %2d) %-35s\n", 
			$start + $i, edict_sugg_trim($suggestions->[$i-1], 35), 
			$start + $i+1, edict_sugg_trim($suggestions->[$i], 35);
	}
	# print the last item if there were odd no. of entries
	printf "%2d) %-35s\n", $start + $i, 
			edict_sugg_trim($suggestions->[$i-1], 35)
			if ((@{$suggestions}) % 2);
	print " ------------------------------------------------------------------------------\n";
	edict_print_centered("p - prev page; n - next page; gX - jump to Xth entry");
}




##############################################################################
# edict_http_send_and_recv
#
# Sends the given HTTP request and returns the response
##############################################################################
sub edict_http_send_and_recv($)
{
	my $req = shift;

	# read the dictionary output from stdin, if user said so
	if ($read_from_stdin) {
		my $reply = '';
		while (<STDIN>) {
			$reply .= $_;
			last if /<\/html>/;
		}
		return \$reply;
	}
	return undef unless defined $req;

	# Get the host from the request
	my $req_host = $req->[$http_host];
	# keep the hostname, strip the rest
	$req_host =~ s/host:\s*//goi;
	my $http_server = defined($proxy_server) ?  $proxy_server : $req_host;
	die "No valid server to send request to!\n" unless defined $http_server;
	my $http_port = defined($proxy_port) ? 
				$proxy_port : getservbyname('http', 'tcp');

	# BUG 915186 - undefined HTTP port number. This should really be fixed
	# by each dictionary providing its own port #.
	$http_port = 80 unless defined $http_port;

	#print "Port is $http_port, dicthost is $http_server\n";

	die "socket: $!\n" unless
		socket(DICT, PF_INET, SOCK_STREAM, getprotobyname('tcp'));

	# convert hostname to IP : 769932
	my $sin;
	if ($http_server =~ /\d+\.\d+\.\d+\.\d+/) {
		$sin = sockaddr_in($http_port, inet_aton($http_server));
	} else {
		my $addr0 = (gethostbyname($http_server))[4];
		die "ERROR $http_server: ".$netdb_errors[$?] if $?;
		$sin = sockaddr_in($http_port, $addr0);
	}
		
	#print "connecting...\n";
	die "connect: $!\n" unless connect(DICT, $sin);

	# send it
	foreach (@{$req}) {
		#print $_, "\r\n" if defined $_;
		send DICT, $_."\r\n", 0 if defined $_;
	}
	#print "sent\n";

	# store reply
	my $reply = '';
	while (<DICT>) {
		$reply .= $_;
		last if /<\/html>/;
	}
	#print "recd reply\n$reply";

	# close connection
	close(DICT);

	# save the HTTP response to a file, if asked to do so
	if (defined $save_to_file) {
		if (open(SAVETO, ">$save_to_file")) {
			print SAVETO $reply;
			close(SAVETO);
		} else {
			print STDERR "Couldn't open $save_to_file: $!\n";
		}
	}

	# return reply
	return \$reply;
}

	

##############################################################################
# edict_list_dictionaries
#
# Displays the list of available dictionaries
##############################################################################
sub edict_list_dictionaries()
{
	printf "%-25s Description\n", 'Name';
	print 
"-------------------------------------------------------------------------------\n";
	foreach my $dict (sort keys %dicts) {
		printf "%-25s %s\n", $dict, $dicts{$dict}{TITLE};
	}
}


##############################################################################
# edict_rid_chunked
#
# Get rid of chunked encoding length indicators from the given text
##############################################################################
sub edict_rid_chunked($)
{
	my $text = shift;

	# Get rid of chunked encoding length indicators
	${$text} =~ s/\r?\n[0-9a-fA-F]+\s*\r?\n//sog;
	#print "--------\n", ${$text}, "---------\n";
}


##############################################################################
# edict_html2plain
#
# Convert from HTML to plain text by getting rid of tags
##############################################################################
sub edict_html2plain($)
{
	my $text = shift;
	my $subst;

	# fix pronunciation for superscript directives
	${$text} =~ s/<sup>(.)<\/sup>/($1)/sogi;
	# fix subscript directives: Bug 771934
	${$text} =~ s/<sub>(\d+)<\/sub>/($1)/sogi;

	# remove font, href, img etc. tags
	${$text} =~ s/<font.*?>//sogi;
	${$text} =~ s/<\/font>//sogi;
	${$text} =~ s/<\/?a(| .*?)>//sogi;
	${$text} =~ s/<img.*?>//sogi;
	${$text} =~ s/<\/?tt>//sogi;

	# remove other unwanted HTML tags
	${$text} =~ s/<\/?t(d|r)>//sogi;
	${$text} =~ s/<\/?table>//sogi;
	${$text} =~ s/<\/?blockquote>//sogi;

	# umlauts / digraphs / diacritics
	while (${$text} =~ /(&[a-zA-Z]+;)/g) {
		$subst = chr($digraph{$1});
		${$text} =~ s/$1/$subst/s;
	}

	# characters specified using theri ASCII codes
	while (${$text} =~ /(&#(\d+);)/g) {
		$subst = chr($2);
		${$text} =~ s/$1/$subst/s;
	}
}



##############################################################################
# edict_print_centered
#
# Print a line centered on the screen. Adds a newline at the end.
##############################################################################
sub edict_print_centered($)
{
	my $text = shift;
	print " " x ((80 - length($text)) / 2), $text, "\n";
}



##############################################################################
# edict_sugg_trim
#
# Trims a suggestion by given length
##############################################################################
sub edict_sugg_trim($$)
{
	my ($text, $len) = @_;
	my $suffix = '...';
	return $text if (length($text) <= $len);
	return substr($text, 0, $len - length($suffix)) . $suffix;
}



# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 			configuration handling
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

##############################################################################
# edict_read_config
#
# Reads the configuration files and sets up various parameters that let the
# user customize the operation of edict
##############################################################################
sub edict_read_config()
{
	my @files;

	if (defined $ENV{'EDICT_CONF'}) {
		@files = split ':', $ENV{'EDICT_CONF'};
	} elsif ($^O =~ /mswin/oi) { 		# Windows
		@files = (EDICT_WIN_CONF, EDICT_WIN_USER_CONF);
	} else {							# Not Windows. Use UNIX files
		@files = (EDICT_UNIX_CONF, EDICT_UNIX_USER_CONF);
	}

	foreach my $file (@files) {
		unless (open(CONF, $file)) {
			# show all errors except "No such file or directory"
			print STDERR "$file: $!\n" if -f $file;
			next;
		}

		my $line = 0;
		#print "Reading $file\n";
		while (<CONF>) {
			++$line;
			next if /^\s*#/o;
			my ($token, $val) = ($1, $2) if /\s*(\S+)\s*=\s*(\S+)/o;

			# dict
			if ($token eq 'dict') {
				if (defined $dicts{$val}) {
					$cur_dict = $val;
				} else {
					print STDERR "ERROR: $file:$line: Dictionary \"$val\" not found.(Use edict -l).\n";
				}

			# suggperpage
			} elsif ($token eq 'suggperpage') {
				if ($val =~ /^\d+$/o) {
					$nsugg = $val;
				} else {
					print STDERR "ERROR: $file:$line: suggperpage should be an integer > 0.\n";
				}

			# suggest
			} elsif ($token eq 'suggest') {
				if ($val eq 'yes') {
					$suggest = 1;
				} elsif ($val eq 'no') {
					$suggest = 0;
				} else {
					print STDERR "ERROR: $file:$line: \"suggest\" should be either \"yes\" or \"no\".\n";
				}

			# color
			} elsif ($token eq 'color') {
				if ($val eq 'yes') {
					$color = 1;
				} elsif ($val eq 'no') {
					print STDERR "ERROR: $file:$line: \"color\" should be either \"yes\" or \"no\".\n";
				}

			# BUG 1099157: bummer, forgot to code httpproxy
			# httpproxy
			} elsif ($token eq 'httpproxy') {
				($proxy_server, $proxy_port) = split /:/, $val;

			# invalid token?
			} else {
				print STDERR "ERROR: $file:$line: Syntax error!\n";
			}
		}
	}
}



# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 				m-w functions
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

##############################################################################
# mw_create_request
#
# Creates the HTTP request and 
##############################################################################
sub mw_create_request($$$)
{
	my ($start, $nsugg, $C) = @_;
	die "Context is NULL!" unless defined $C;

	return undef unless defined $C->{word};

	# store the word. 
	$C->{hdword} = $C->{word} unless defined ${$C->{response}};	
	# NOTE: hdword is a mw specific extension and cannot be assumed to be 
	# available in other dictionaries

	my @req = @http_request;
	my $target;

	if ($C->{dict} eq 'mwdict') {
		$target = 'dictionary';
	} elsif ($C->{dict} eq 'mwthes') {
		$target = 'thesaurus';
	}
	$req[$http_method] = "POST http://www.m-w.com/cgi-bin/$target HTTP/1.1";
	$req[$http_referer] = "Referer: http://www.m-w.com/cgi-bin/$target";
	$req[$http_host] = 'Host: www.m-w.com';
	$req[$http_content] = mw_create_content($C);
	$req[$http_content_len] = 'Content-length: ' . length($req[$http_content]);

	return \@req;
}


##############################################################################
# mw_create_content
#
# generates the content for the m-w POST request
##############################################################################
sub mw_create_content($)
{
	my $C = shift;
	die "Context is NULL!\n" unless defined $C;

	my $book;

	if ($C->{dict} eq 'mwdict') {
		$book = 'Dictionary';
	} elsif ($C->{dict} eq 'mwthes') {
		$book = 'Thesaurus';
	}

	my $content;
	unless (defined $C->{meta}) {		# simple case
		$content = "book=$book&va=$C->{hdword}";
	} else { 	# complex case - consider meta information, 
				# which is a list of values
		# convert non alpha chars in meta to their ascii codes in hex
		$C->{meta} =~ s/\[/%5B/og;
		$C->{meta} =~ s/\]/%5D/og;
		$C->{meta} =~ s/,/%2C/og;
		$C->{meta} =~ s/=/%3D/og;
		$C->{meta} =~ s/ /%20/og;
		my $word = $C->{word};
		$word =~ s/\[/%5B/og;
		$word =~ s/\]/%5D/og;
		$word =~ s/ /%20/og;

		$content = "hdwd=$C->{hdword}&listword=$C->{hdword}&book=$book&jump=$word&list=$C->{meta}";
	}

	#print $content;
	return $content;
}






##############################################################################
# mw_parse_response
#
# parses the response returned by m-w.
##############################################################################
sub mw_parse_response($$$)
{
	my ($start, $nsugg, $C) = @_;
	my $word = $C->{word};

	my $response = $C->{response};

	# no response? do nothing
	return unless defined $response;

	# start with no suggestions
	$C->{suggestions} = [];

	# get rid of chunked encoding
	edict_rid_chunked($response);

	#print "response is : ", ${$response}, "\n";
	# if the word was misspelled, offer suggestions and indicate failure
	if (${$response} =~ s#Suggestions for <STRONG>$word</STRONG>##s) {
		if (${$response} =~ m#<PRE>(.*?)</PRE>#so) {
			my $suggestions_text = $1;
			#print "Suggestion text: $suggestions_text\n";
			while ($suggestions_text =~ s#(\d+)\. <a .*?>(.*?)</a>##so) {
				$C->{nsuggestions} = $1;
				push @{$C->{suggestions}}, $2;
			}
		}
		${$response} = undef;
		return;
	}

	# -- 8< -- 8< -- edit/prune/splice operations below -- 8< -- 8< --
	# get rid of everything till the start of content
	unless (${$response} =~ s#^.*?word_definition.*?\r*\n##sog) {
	}

	# find the number of entries
	unless (${$response} =~ s/.*?(No|One|\d+) entr(y|ies) found//so) {
		${$response} = undef;
		return;
	}
	my $nentries = $1;
	#print "entries: $nentries\n";
	unless ($nentries eq 'One' || $nentries eq 'No') {
		# m-w doesn't show more than 10 entries... 
		# so adjust the count if more than 10
		$nentries = $nentries > 10 ? 10 : $nentries;
		#print "no. of entries: $nentries\n";

		${$response} =~ m#(<select style.*?/select>)#so;
		my $suggestions_text = $1;

		#print "Suggestion text: $suggestions_text\n";
		# parse the suggestions and store them in the suggestions list
		while ($suggestions_text =~ m/<option>([^\r\n]+)/sog) {
			#print "Option: $1, $suggestions_text\n";
			push @{$C->{suggestions}}, $1;
		}

		#print "Suggestions: ", join(', ', @{$C->{suggestions}}), "\n";

		${$response} =~ 
			s/<input\s+type=hidden\s+name=list\s+value="(.*?)">//o;
		my $listval = $1;

		#print $listval;
		$C->{meta} = $listval;
	}
	$C->{nsuggestions} = $nentries;

	# cut everything out except the "meat"
	unless (${$response} =~ s#.*?<form name="entry".*?</form>##so) {
		${$response} = undef;
		return;
	}
	${$response} =~ s#</div>.*##so;

	# special case for thesaurus: Print Synonym and other headers with colon
	if ($C->{dict} eq 'mwthes') {
		${$response} =~ s/Synonyms /Synonyms: /sog;
		${$response} =~ s/Related Word /Related Words: /sog;
		${$response} =~ s/Contrasted Words /Contrasted Words: /sog;
	}

	# Bug 1091884 - the "I Sup" bug
	${$response} =~ s#<i><sup>(\d+)</i></sup>#<i><sup>$1</sup></i>#sog;
	# fix Main Entry to show superscripted Entry # properly
	${$response} =~ s#<sup>(\d+)</sup>([^\s<]+)#$2($1)#sogi;

	# get rid of html
	edict_html2plain($response);

	# Handle line breaks
	${$response} =~ s/\n\s*<br>|<br>\s*\r*\n/\n/sog;
	${$response} =~ s/<br>/\n/sog;
	#print ${$response}, "\n";

	# separate meaning from date : BUG # 672762
	${$response} =~ s/Date:([^\n]*?):/Date:$1\n:/so;
	# synonyms etc. headings have already been changed above to have a colon
	# The line below utilizes that fact
	${$response} =~ s/Text:\s*(\w+):/Text:\n$1/so;

	${$response} =~ s/\xB7/./sog;

	# Do all the color coding stuff at the end
	# change bold, italic tags
	if ($color && $^O =~ /linux/oi) {
		${$response} =~ s/<b>/\e[1;34m/sog;
		${$response} =~ s/<i>/\e[34m/sog;
		${$response} =~ s/<\/[bi]>/\e[0m/sog;
	} else {
    		${$response} =~ s/<\/?[biu]>//sog;
	}

	# remove unwanted spaces
	${$response} =~ s/ {2,}/ /sog;
	${$response} =~ s/\s:/:/sog;
	#${$response} =~ s/\n{2,}/\n\n/sog;	# don't want > 2 consec. \ns
	#print ${$response};
	#print "-----------------\n";
}


##############################################################################
# mw_get_suggestions
#
# Returns $nsugg suggestions starting with $start
#
# NOTES specific to m-w implementation:
# If $C->{suggestions} is 'undef', this means that we couldn't retrieve
# suggestions. We return 'undef' to communicate that.
# If $C->{suggestions} is 0, this means we tried to fetch suggestions and
# no suggestions were available. We return ref to an empty array to 
# communicate that.
# If $C->{suggestions} has a +ve value, we return the appropriate number of
# suggestions.
##############################################################################
sub mw_get_suggestions($$$)
{
	my ($start, $nsugg, $C) = @_;
	my @sugg = ();

	return undef unless defined $C->{suggestions};
	return \@sugg unless @{$C->{suggestions}};

	if ($start >= @{$C->{suggestions}} || $nsugg <= 0) {
		return \@sugg;
	}

	my $end = $start + $nsugg - 1;
	$end = ($end >= @{$C->{suggestions}}) ? @{$C->{suggestions}} - 1 : $end;
	#print "start: $start, end: $end, nsugg: $nsugg\n";
	for (my $i = $start; $i <= $end; ++$i) {
		push @sugg, $C->{suggestions}->[$i];
	}
	return \@sugg;
}



# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# www.dictionary.com functions
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

##############################################################################
# dictionarydotcom_create_request
#
# generates the HTTP request for dictionary.com
##############################################################################
sub dictionarydotcom_create_request($$$)
{
	my ($start, $nsugg, $C) = @_;
	die "Context is NULL!" unless defined $C;

	return undef unless defined $C->{word};

	my @req = @http_request;
	my $target;

	if ($C->{dict} eq 'dictionary.com') {
		$target = 'dictionary';
	} elsif ($C->{dict} eq 'thesaurus.com') {
		$target = 'thesaurus';
	}
	$req[$http_method] = "GET http://$target.reference.com/search?q=$C->{word} HTTP/1.1";
	$req[$http_referer] = "Referer: http://www.dictionary.com/";
	$req[$http_host] = 'Host: dictionary.reference.com';
	$req[$http_content] = undef;
	$req[$http_content_len] = undef;

	return \@req;
}


##############################################################################
# dictionarydotcom_parse_response
#
# Parse the response from dictionary.com
##############################################################################
sub dictionarydotcom_parse_response($$$)
{
	my ($start, $nsugg, $C) = @_;
	my ($text, $source);

	my $response = $C->{response};

	# no response? do nothing
	return unless defined $response;

	edict_rid_chunked($response);

	# start with no suggestions
	$C->{suggestions} = [];

	${$response} =~ s/.*?>(\d+) entr(y|ies) found for .*?h2>//so;
	$C->{nsuggestions} = $1;
	#print $C->{nsuggestions}, " entries found\n";

	while (${$response} =~ s/<!-- begin \w+ -->(.*?)<br>.*?<span class.*?<cite>(.*?)<\/cite>.*?<!-- end \w+ -->//so) {
		($text, $source) = ($1, $2);
		edict_html2plain(\$text);
		edict_html2plain(\$source);

		# Do all the color coding stuff at the end
		# change bold, italic tags
		if ($color && $^O =~ /linux/oi) {
			$text =~ s/<b>/\e[1;34m/sogi;
			$text =~ s/<i>/\e[34m/sogi;
			$text =~ s/<\/[bi]>/\e[0m/sogi;
		} else {
			$text =~ s/<\/?[bi]>//sogi;
		}

		push @{$C->{suggestions_text}}, $text;
		push @{$C->{suggestions}}, $source;
		
		#print "\n\nSuggestion from $source:\n$text";
	}
	$C->{response} = \$C->{suggestions_text}->[0];
	#print ${$response};
}

##############################################################################
# dictionarydotcom_get_suggestions
#
# Return a given number of suggestions for the given context
##############################################################################
sub dictionarydotcom_get_suggestions($$$)
{
	my ($start, $nsugg, $C) = @_;

	return unless @{$C->{suggestions}};

	my @sugg = ();
	for (my $i=0; $i < $nsugg; ++$i) {
		push @sugg, $C->{suggestions}->[$start + $i];
	}
	return \@sugg;
}






# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Digraph map - It's more than you need and more than you are used to!
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
sub BEGIN {
%digraph = (
	'&aacute;' => 0x000E1,
	'&Aacute;' => 0x000C1,
	'&abreve;' => 0x00103,
	'&Abreve;' => 0x00102,
	'&ac;' => 0x0290F,
	'&acd;' => 0x0223F,
	'&acE;' => 0x029DB,
	'&acirc;' => 0x000E2,
	'&Acirc;' => 0x000C2,
	'&acute;' => 0x000B4,
	'&acy;' => 0x00430,
	'&Acy;' => 0x00410,
	'&aelig;' => 0x000E6,
	'&AElig;' => 0x000C6,
	'&af;' => 0x02061,
	'&agrave;' => 0x000E0,
	'&Agrave;' => 0x000C0,
	'&aleph;' => 0x02135,
	'&alpha;' => 0x003B1,
	'&amacr;' => 0x00101,
	'&Amacr;' => 0x00100,
	'&amalg;' => 0x02A3F,
	'&amp;' => 0x00026,
	'&and;' => 0x02227,
	'&And;' => 0x02A53,
	'&andand;' => 0x02A55,
	'&andd;' => 0x02A5C,
	'&andslope;' => 0x02A58,
	'&andv;' => 0x02A5A,
	'&ang;' => 0x02220,
	'&ange;' => 0x029A4,
	'&angle;' => 0x02220,
	'&angmsd;' => 0x02221,
	'&angmsdaa;' => 0x029A8,
	'&angmsdab;' => 0x029A9,
	'&angmsdac;' => 0x029AA,
	'&angmsdad;' => 0x029AB,
	'&angmsdae;' => 0x029AC,
	'&angmsdaf;' => 0x029AD,
	'&angmsdag;' => 0x029AE,
	'&angmsdah;' => 0x029AF,
	'&angrt;' => 0x0221F,
	'&angrtvb;' => 0x0299,
	'&angrtvbd;' => 0x0299D,
	'&angsph;' => 0x02222,
	'&angst;' => 0x0212B,
	'&angzarr;' => 0x0237C,
	'&aogon;' => 0x00105,
	'&Aogon;' => 0x00104,
	'&ap;' => 0x02248,
	'&apacir;' => 0x02A6F,
	'&ape;' => 0x0224A,
	'&apE;' => 0x0224A,
	'&apid;' => 0x0224B,
	'&apos;' => 0x00027,
	'&ApplyFunction;' => 0x02061,
	'&approx;' => 0x02248,
	'&approxeq;' => 0x0224A,
	'&aring;' => 0x000E5,
	'&Aring;' => 0x000C5,
	'&Assign;' => 0x02254,
	'&ast;' => 0x0002A,
	'&asymp;' => 0x0224D,
	'&atilde;' => 0x000E3,
	'&Atilde;' => 0x000C3,
	'&auml;' => 0x000E4,
	'&Auml;' => 0x000C4,
	'&awconint;' => 0x02233,
	'&awint;' => 0x02A11,
	'&backcong;' => 0x0224C,
	'&backepsilon;' => 0x003F6,
	'&backprime;' => 0x02035,
	'&backsim;' => 0x0223D,
	'&backsimeq;' => 0x022CD,
	'&Backslash;' => 0x02216,
	'&Barv;' => 0x02AE7,
	'&barvee;' => 0x022BD,
	'&barwed;' => 0x022BC,
	'&Barwed;' => 0x02306,
	'&barwedge;' => 0x022BC,
	'&bbrk;' => 0x023B5,
	'&bcong;' => 0x0224C,
	'&bcy;' => 0x00431,
	'&Bcy;' => 0x00411,
	'&becaus;' => 0x02235,
	'&because;' => 0x02235,
	'&Because;' => 0x02235,
	'&bemptyv;' => 0x029B0,
	'&bepsi;' => 0x003F6,
	'&bernou;' => 0x0212C,
	'&Bernoullis;' => 0x0212C,
	'&beta;' => 0x003B2,
	'&beth;' => 0x02136,
	'&between;' => 0x0226C,
	'&bigcap;' => 0x022C2,
	'&bigcirc;' => 0x025EF,
	'&bigcup;' => 0x022C3,
	'&bigodot;' => 0x02299,
	'&bigoplus;' => 0x02295,
	'&bigotimes;' => 0x02297,
	'&bigsqcup;' => 0x02294,
	'&bigstar;' => 0x02605,
	'&bigtriangledown;' => 0x025BD,
	'&bigtriangleup;' => 0x025B3,
	'&biguplus;' => 0x0228E,
	'&bigvee;' => 0x022C1,
	'&bigwedge;' => 0x022C0,
	'&bkarow;' => 0x0290D,
	'&blacklozenge;' => 0x029EB,
	'&blacksquare;' => 0x025AA,
	'&blacktriangle;' => 0x025B4,
	'&blacktriangledown;' => 0x025BE,
	'&blacktriangleleft;' => 0x025C2,
	'&blacktriangleright;' => 0x025B8,
	'&blank;' => 0x02423,
	'&blk12;' => 0x02592,
	'&blk14;' => 0x02591,
	'&blk34;' => 0x02593,
	'&block;' => 0x02588,
	'&bne;' => 0x0003,
	'&bnequiv;' => 0x0226,
	'&bnot;' => 0x02310,
	'&bNot;' => 0x02AED,
	'&bot;' => 0x022A5,
	'&bottom;' => 0x022A5,
	'&bowtie;' => 0x022C8,
	'&boxbox;' => 0x029C9,
	'&boxdl;' => 0x02510,
	'&boxdL;' => 0x02555,
	'&boxDl;' => 0x02556,
	'&boxDL;' => 0x02557,
	'&boxdr;' => 0x0250C,
	'&boxdR;' => 0x02552,
	'&boxDr;' => 0x02553,
	'&boxDR;' => 0x02554,
	'&boxh;' => 0x02500,
	'&boxH;' => 0x02550,
	'&boxhd;' => 0x0252C,
	'&boxhD;' => 0x02565,
	'&boxHd;' => 0x02564,
	'&boxHD;' => 0x02566,
	'&boxhu;' => 0x02534,
	'&boxhU;' => 0x02568,
	'&boxHu;' => 0x02567,
	'&boxHU;' => 0x02569,
	'&boxminus;' => 0x0229F,
	'&boxplus;' => 0x0229E,
	'&boxtimes;' => 0x022A0,
	'&boxul;' => 0x02518,
	'&boxuL;' => 0x0255B,
	'&boxUl;' => 0x0255C,
	'&boxUL;' => 0x0255D,
	'&boxur;' => 0x02514,
	'&boxuR;' => 0x02558,
	'&boxUr;' => 0x02559,
	'&boxUR;' => 0x0255A,
	'&boxv;' => 0x02502,
	'&boxV;' => 0x02551,
	'&boxvh;' => 0x0253C,
	'&boxvH;' => 0x0256A,
	'&boxVh;' => 0x0256B,
	'&boxVH;' => 0x0256C,
	'&boxvl;' => 0x02524,
	'&boxvL;' => 0x02561,
	'&boxVl;' => 0x02562,
	'&boxVL;' => 0x02563,
	'&boxvr;' => 0x0251C,
	'&boxvR;' => 0x0255E,
	'&boxVr;' => 0x0255F,
	'&boxVR;' => 0x02560,
	'&bprime;' => 0x02035,
	'&breve;' => 0x002D8,
	'&Breve;' => 0x002D8,
	'&brvbar;' => 0x000A6,
	'&Bscr;' => 0x0212C,
	'&bsemi;' => 0x0204F,
	'&bsim;' => 0x0223D,
	'&bsime;' => 0x022CD,
	'&bsol;' => 0x0005C,
	'&bsolb;' => 0x029C5,
	'&bsolhsub;' => 0x0005,
	'&bull;' => 0x02022,
	'&bullet;' => 0x02022,
	'&bump;' => 0x0224E,
	'&bumpe;' => 0x0224F,
	'&bumpE;' => 0x02AAE,
	'&bumpeq;' => 0x0224F,
	'&Bumpeq;' => 0x0224E,
	'&cacute;' => 0x00107,
	'&Cacute;' => 0x00106,
	'&cap;' => 0x02229,
	'&Cap;' => 0x022D2,
	'&capand;' => 0x02A44,
	'&capbrcup;' => 0x02A49,
	'&capcap;' => 0x02A4B,
	'&capcup;' => 0x02A47,
	'&capdot;' => 0x02A40,
	'&CapitalDifferentialD;' => 0x02145,
	'&caps;' => 0x0222,
	'&caret;' => 0x02041,
	'&caron;' => 0x002C7,
	'&Cayleys;' => 0x0212D,
	'&ccaps;' => 0x02A4D,
	'&ccaron;' => 0x0010D,
	'&Ccaron;' => 0x0010C,
	'&ccedil;' => 0x000E7,
	'&Ccedil;' => 0x000C7,
	'&ccirc;' => 0x00109,
	'&Ccirc;' => 0x00108,
	'&Cconint;' => 0x02230,
	'&ccups;' => 0x02A4C,
	'&ccupssm;' => 0x02A50,
	'&cdot;' => 0x0010B,
	'&Cdot;' => 0x0010A,
	'&cedil;' => 0x000B8,
	'&Cedilla;' => 0x000B8,
	'&cemptyv;' => 0x029B2,
	'&cent;' => 0x000A2,
	'&centerdot;' => 0x000B7,
	'&CenterDot;' => 0x000B7,
	'&Cfr;' => 0x0212D,
	'&chcy;' => 0x00447,
	'&CHcy;' => 0x00427,
	'&check;' => 0x02713,
	'&checkmark;' => 0x02713,
	'&chi;' => 0x003C7,
	'&cir;' => 0x025CB,
	'&circ;' => 0x0005E,
	'&circeq;' => 0x02257,
	'&circlearrowleft;' => 0x021BA,
	'&circlearrowright;' => 0x021BB,
	'&circledast;' => 0x0229B,
	'&circledcirc;' => 0x0229A,
	'&circleddash;' => 0x0229D,
	'&CircleDot;' => 0x02299,
	'&circledR;' => 0x000AE,
	'&circledS;' => 0x024C8,
	'&CircleMinus;' => 0x02296,
	'&CirclePlus;' => 0x02295,
	'&CircleTimes;' => 0x02297,
	'&cire;' => 0x02257,
	'&cirE;' => 0x029C3,
	'&cirfnint;' => 0x02A10,
	'&cirmid;' => 0x02AEF,
	'&cirscir;' => 0x029C2,
	'&ClockwiseContourIntegral;' => 0x02232,
	'&CloseCurlyDoubleQuote;' => 0x0201D,
	'&CloseCurlyQuote;' => 0x02019,
	'&clubs;' => 0x02663,
	'&clubsuit;' => 0x02663,
	'&colon;' => 0x0003A,
	'&Colon;' => 0x02237,
	'&colone;' => 0x02254,
	'&Colone;' => 0x02A74,
	'&coloneq;' => 0x02254,
	'&comma;' => 0x0002C,
	'&commat;' => 0x00040,
	'&comp;' => 0x02201,
	'&compfn;' => 0x02218,
	'&complement;' => 0x02201,
	'&complexes;' => 0x02102,
	'&cong;' => 0x02245,
	'&congdot;' => 0x02A6D,
	'&Congruent;' => 0x02261,
	'&conint;' => 0x0222E,
	'&Conint;' => 0x0222F,
	'&ContourIntegral;' => 0x0222E,
	'&Copf;' => 0x02102,
	'&coprod;' => 0x02210,
	'&Coproduct;' => 0x02210,
	'&copy;' => 0x000A9,
	'&copysr;' => 0x02117,
	'&CounterClockwiseContourIntegral;' => 0x02233,
	'&cross;' => 0x02717,
	'&Cross;' => 0x02A2F,
	'&csub;' => 0x02ACF,
	'&csube;' => 0x02AD1,
	'&csup;' => 0x02AD0,
	'&csupe;' => 0x02AD2,
	'&ctdot;' => 0x022EF,
	'&cudarrl;' => 0x02938,
	'&cudarrr;' => 0x02935,
	'&cuepr;' => 0x022DE,
	'&cuesc;' => 0x022DF,
	'&cularr;' => 0x021B6,
	'&cularrp;' => 0x0293D,
	'&cup;' => 0x0222A,
	'&Cup;' => 0x022D3,
	'&cupbrcap;' => 0x02A48,
	'&cupcap;' => 0x02A46,
	'&CupCap;' => 0x0224D,
	'&cupcup;' => 0x02A4A,
	'&cupdot;' => 0x0228D,
	'&cupor;' => 0x02A45,
	'&cups;' => 0x0222,
	'&curarr;' => 0x021B7,
	'&curarrm;' => 0x0293C,
	'&curlyeqprec;' => 0x022DE,
	'&curlyeqsucc;' => 0x022DF,
	'&curlyvee;' => 0x022CE,
	'&curlywedge;' => 0x022CF,
	'&curren;' => 0x000A4,
	'&curvearrowleft;' => 0x021B6,
	'&curvearrowright;' => 0x021B7,
	'&cuvee;' => 0x022CE,
	'&cuwed;' => 0x022CF,
	'&cwconint;' => 0x02232,
	'&cwint;' => 0x02231,
	'&cylcty;' => 0x0232D,
	'&dagger;' => 0x02020,
	'&dagger;' => 0x02020,
	'&Dagger;' => 0x02021,
	'&Dagger;' => 0x02021,
	'&daleth;' => 0x02138,
	'&darr;' => 0x02193,
	'&dArr;' => 0x021D3,
	'&Darr;' => 0x021A1,
	'&dash;' => 0x02010,
	'&dashv;' => 0x022A3,
	'&Dashv;' => 0x02AE4,
	'&dbkarow;' => 0x0290F,
	'&dblac;' => 0x002DD,
	'&dcaron;' => 0x0010F,
	'&Dcaron;' => 0x0010E,
	'&dcy;' => 0x00434,
	'&Dcy;' => 0x00414,
	'&dd;' => 0x02146,
	'&DD;' => 0x02145,
	'&ddagger;' => 0x02021,
	'&ddarr;' => 0x021CA,
	'&DDotrahd;' => 0x02911,
	'&ddotseq;' => 0x02A77,
	'&deg;' => 0x000B0,
	'&Del;' => 0x02207,
	'&delta;' => 0x003B4,
	'&Delta;' => 0x00394,
	'&demptyv;' => 0x029B1,
	'&dfisht;' => 0x0297F,
	'&dHar;' => 0x02965,
	'&dharl;' => 0x021C3,
	'&dharr;' => 0x021C2,
	'&DiacriticalAcute;' => 0x000B4,
	'&DiacriticalDot;' => 0x002D9,
	'&DiacriticalDoubleAcute;' => 0x002DD,
	'&DiacriticalGrave;' => 0x00060,
	'&DiacriticalTilde;' => 0x002DC,
	'&diam;' => 0x022C4,
	'&diamond;' => 0x022C4,
	'&Diamond;' => 0x022C4,
	'&diamondsuit;' => 0x02666,
	'&diams;' => 0x02666,
	'&die;' => 0x000A8,
	'&DifferentialD;' => 0x02146,
	'&digamma;' => 0x003DC,
	'&disin;' => 0x022F2,
	'&div;' => 0x000F7,
	'&divide;' => 0x000F7,
	'&divideontimes;' => 0x022C7,
	'&divonx;' => 0x022C7,
	'&djcy;' => 0x00452,
	'&DJcy;' => 0x00402,
	'&dlcorn;' => 0x0231E,
	'&dlcrop;' => 0x0230D,
	'&dollar;' => 0x00024,
	'&dot;' => 0x002D9,
	'&Dot;' => 0x000A8,
	'&DotDot;' => 0x020DC,
	'&doteq;' => 0x02250,
	'&doteqdot;' => 0x02251,
	'&DotEqual;' => 0x02250,
	'&dotminus;' => 0x02238,
	'&dotplus;' => 0x02214,
	'&dotsquare;' => 0x022A1,
	'&doublebarwedge;' => 0x02306,
	'&DoubleContourIntegral;' => 0x0222F,
	'&DoubleDot;' => 0x000A8,
	'&DoubleDownArrow;' => 0x021D3,
	'&DoubleLeftArrow;' => 0x021D0,
	'&DoubleLeftRightArrow;' => 0x021D4,
	'&DoubleLeftTee;' => 0x02AE4,
	'&DoubleLongLeftArrow;' => 0x0F579,
	'&DoubleLongLeftRightArrow;' => 0x0F57B,
	'&DoubleLongRightArrow;' => 0x0F57A,
	'&DoubleRightArrow;' => 0x021D2,
	'&DoubleRightTee;' => 0x022A8,
	'&DoubleUpArrow;' => 0x021D1,
	'&DoubleUpDownArrow;' => 0x021D5,
	'&DoubleVerticalBar;' => 0x02225,
	'&downarrow;' => 0x02193,
	'&Downarrow;' => 0x021D3,
	'&DownArrow;' => 0x02193,
	'&DownArrowBar;' => 0x02913,
	'&DownArrowUpArrow;' => 0x021F5,
	'&DownBreve;' => 0x00311,
	'&downdownarrows;' => 0x021CA,
	'&downharpoonleft;' => 0x021C3,
	'&downharpoonright;' => 0x021C2,
	'&DownLeftRightVector;' => 0x02950,
	'&DownLeftTeeVector;' => 0x0295E,
	'&DownLeftVector;' => 0x021BD,
	'&DownLeftVectorBar;' => 0x02956,
	'&DownRightTeeVector;' => 0x0295F,
	'&DownRightVector;' => 0x021C1,
	'&DownRightVectorBar;' => 0x02957,
	'&DownTee;' => 0x022A4,
	'&DownTeeArrow;' => 0x021A7,
	'&drbkarow;' => 0x02910,
	'&drcorn;' => 0x0231F,
	'&drcrop;' => 0x0230C,
	'&dscy;' => 0x00455,
	'&DScy;' => 0x00405,
	'&dsol;' => 0x029F6,
	'&dstrok;' => 0x00111,
	'&Dstrok;' => 0x00110,
	'&dtdot;' => 0x022F1,
	'&dtri;' => 0x025BF,
	'&dtrif;' => 0x025BE,
	'&duarr;' => 0x021F5,
	'&duhar;' => 0x0296F,
	'&dwangle;' => 0x029A6,
	'&dzcy;' => 0x0045F,
	'&DZcy;' => 0x0040F,
	'&dzigrarr;' => 0x0F5A2,
	'&eacute;' => 0x000E9,
	'&Eacute;' => 0x000C9,
	'&easter;' => 0x0225B,
	'&ecaron;' => 0x0011B,
	'&Ecaron;' => 0x0011A,
	'&ecir;' => 0x02256,
	'&ecirc;' => 0x000EA,
	'&Ecirc;' => 0x000CA,
	'&ecolon;' => 0x02255,
	'&ecy;' => 0x0044D,
	'&Ecy;' => 0x0042D,
	'&eDDot;' => 0x02A77,
	'&edot;' => 0x00117,
	'&eDot;' => 0x02251,
	'&Edot;' => 0x00116,
	'&ee;' => 0x02147,
	'&efDot;' => 0x02252,
	'&eg;' => 0x02A9A,
	'&egrave;' => 0x000E8,
	'&Egrave;' => 0x000C8,
	'&egs;' => 0x022DD,
	'&egsdot;' => 0x02A98,
	'&el;' => 0x02A99,
	'&Element;' => 0x02208,
	'&ell;' => 0x02113,
	'&els;' => 0x022DC,
	'&elsdot;' => 0x02A97,
	'&emacr;' => 0x00113,
	'&Emacr;' => 0x00112,
	'&empty;' => 0x0220,
	'&emptyset;' => 0x0220,
	'&EmptySmallSquare;' => 0x025FD,
	'&emptyv;' => 0x02205,
	'&EmptyVerySmallSquare;' => 0x0F59C,
	'&emsp;' => 0x02003,
	'&emsp13;' => 0x02004,
	'&emsp14;' => 0x02005,
	'&eng;' => 0x0014B,
	'&ENG;' => 0x0014A,
	'&ensp;' => 0x02002,
	'&eogon;' => 0x00119,
	'&Eogon;' => 0x00118,
	'&epar;' => 0x022D5,
	'&eparsl;' => 0x029E3,
	'&eplus;' => 0x02A71,
	'&epsi;' => 0x003B5,
	'&epsiv;' => 0x0025B,
	'&eqcirc;' => 0x02256,
	'&eqcolon;' => 0x02255,
	'&eqsim;' => 0x02242,
	'&eqslantgtr;' => 0x022DD,
	'&eqslantless;' => 0x022DC,
	'&Equal;' => 0x02A75,
	'&equals;' => 0x0003D,
	'&EqualTilde;' => 0x02242,
	'&equest;' => 0x0225F,
	'&Equilibrium;' => 0x021CC,
	'&equiv;' => 0x02261,
	'&equivDD;' => 0x02A78,
	'&eqvparsl;' => 0x029E5,
	'&erarr;' => 0x02971,
	'&erDot;' => 0x02253,
	'&escr;' => 0x0212F,
	'&Escr;' => 0x02130,
	'&esdot;' => 0x02250,
	'&esim;' => 0x02242,
	'&Esim;' => 0x02A73,
	'&eta;' => 0x003B7,
	'&eth;' => 0x000F0,
	'&ETH;' => 0x000D0,
	'&euml;' => 0x000EB,
	'&Euml;' => 0x000CB,
	'&excl;' => 0x00021,
	'&exist;' => 0x02203,
	'&Exists;' => 0x02203,
	'&expectation;' => 0x02130,
	'&exponentiale;' => 0x02147,
	'&ExponentialE;' => 0x02147,
	'&fallingdotseq;' => 0x02252,
	'&fcy;' => 0x00444,
	'&Fcy;' => 0x00424,
	'&female;' => 0x02640,
	'&ffilig;' => 0x0FB03,
	'&fflig;' => 0x0FB00,
	'&ffllig;' => 0x0FB04,
	'&filig;' => 0x0FB01,
	'&FilledSmallSquare;' => 0x025FE,
	'&FilledVerySmallSquare;' => 0x0F59B,
	'&flat;' => 0x0266D,
	'&fllig;' => 0x0FB02,
	'&fnof;' => 0x00192,
	'&forall;' => 0x02200,
	'&ForAll;' => 0x02200,
	'&fork;' => 0x022D4,
	'&forkv;' => 0x02AD9,
	'&Fouriertrf;' => 0x02131,
	'&fpartint;' => 0x02A0D,
	'&frac12;' => 0x000BD,
	'&frac13;' => 0x02153,
	'&frac14;' => 0x000BC,
	'&frac15;' => 0x02155,
	'&frac16;' => 0x02159,
	'&frac18;' => 0x0215B,
	'&frac23;' => 0x02154,
	'&frac25;' => 0x02156,
	'&frac34;' => 0x000BE,
	'&frac35;' => 0x02157,
	'&frac38;' => 0x0215C,
	'&frac45;' => 0x02158,
	'&frac56;' => 0x0215A,
	'&frac58;' => 0x0215D,
	'&frac78;' => 0x0215E,
	'&frown;' => 0x02322,
	'&Fscr;' => 0x02131,
	'&gacute;' => 0x001F5,
	'&gamma;' => 0x003B3,
	'&Gamma;' => 0x00393,
	'&gammad;' => 0x003DC,
	'&Gammad;' => 0x003DC,
	'&gap;' => 0x02273,
	'&gbreve;' => 0x0011F,
	'&Gbreve;' => 0x0011E,
	'&Gcedil;' => 0x00122,
	'&gcirc;' => 0x0011D,
	'&Gcirc;' => 0x0011C,
	'&gcy;' => 0x00433,
	'&Gcy;' => 0x00413,
	'&gdot;' => 0x00121,
	'&Gdot;' => 0x00120,
	'&ge;' => 0x02265,
	'&gE;' => 0x02267,
	'&gel;' => 0x022DB,
	'&gEl;' => 0x022DB,
	'&geq;' => 0x02265,
	'&geqq;' => 0x02267,
	'&geqslant;' => 0x02A7E,
	'&ges;' => 0x02A7E,
	'&gescc;' => 0x02AA9,
	'&gesdot;' => 0x02A80,
	'&gesdoto;' => 0x02A82,
	'&gesdotol;' => 0x02A84,
	'&gesl;' => 0x022D,
	'&gesles;' => 0x02A94,
	'&gg;' => 0x0226B,
	'&Gg;' => 0x022D9,
	'&ggg;' => 0x022D9,
	'&gimel;' => 0x02137,
	'&gjcy;' => 0x00453,
	'&GJcy;' => 0x00403,
	'&gl;' => 0x02277,
	'&gla;' => 0x02AA5,
	'&glE;' => 0x02A92,
	'&glj;' => 0x02AA4,
	'&gnap;' => 0x02A8A,
	'&gnapprox;' => 0x02A8A,
	'&gne;' => 0x02269,
	'&gnE;' => 0x02269,
	'&gneq;' => 0x02269,
	'&gneqq;' => 0x02269,
	'&gnsim;' => 0x022E7,
	'&grave;' => 0x00060,
	'&GreaterEqual;' => 0x02265,
	'&GreaterEqualLess;' => 0x022DB,
	'&GreaterFullEqual;' => 0x02267,
	'&GreaterGreater;' => 0x02AA2,
	'&GreaterLess;' => 0x02277,
	'&GreaterSlantEqual;' => 0x02A7E,
	'&GreaterTilde;' => 0x02273,
	'&gscr;' => 0x0210A,
	'&gsim;' => 0x02273,
	'&gsime;' => 0x02A8E,
	'&gsiml;' => 0x02A90,
	'&gt;' => 0x0003E,
	'&Gt;' => 0x0226B,
	'&gtcc;' => 0x02AA7,
	'&gtcir;' => 0x02A7A,
	'&gtdot;' => 0x022D7,
	'&gtlPar;' => 0x02995,
	'&gtquest;' => 0x02A7C,
	'&gtrapprox;' => 0x02273,
	'&gtrarr;' => 0x02978,
	'&gtrdot;' => 0x022D7,
	'&gtreqless;' => 0x022DB,
	'&gtreqqless;' => 0x022DB,
	'&gtrless;' => 0x02277,
	'&gtrsim;' => 0x02273,
	'&gvertneqq;' => 0x0226,
	'&gvnE;' => 0x0226,
	'&Hacek;' => 0x002C7,
	'&hairsp;' => 0x0200A,
	'&half;' => 0x000BD,
	'&hamilt;' => 0x0210B,
	'&hardcy;' => 0x0044A,
	'&HARDcy;' => 0x0042A,
	'&harr;' => 0x02194,
	'&hArr;' => 0x021D4,
	'&harrcir;' => 0x02948,
	'&harrw;' => 0x021AD,
	'&Hat;' => 0x00302,
	'&hbar;' => 0x0210,
	'&hcirc;' => 0x00125,
	'&Hcirc;' => 0x00124,
	'&heartsuit;' => 0x02661,
	'&hellip;' => 0x02026,
	'&hercon;' => 0x022B9,
	'&Hfr;' => 0x0210C,
	'&HilbertSpace;' => 0x0210B,
	'&hksearow;' => 0x02925,
	'&hkswarow;' => 0x02926,
	'&hoarr;' => 0x021FF,
	'&homtht;' => 0x0223B,
	'&hookleftarrow;' => 0x021A9,
	'&hookrightarrow;' => 0x021AA,
	'&Hopf;' => 0x0210D,
	'&horbar;' => 0x02015,
	'&HorizontalLine;' => 0x02500,
	'&Hscr;' => 0x0210B,
	'&hslash;' => 0x0210F,
	'&hstrok;' => 0x00127,
	'&Hstrok;' => 0x00126,
	'&HumpDownHump;' => 0x0224E,
	'&HumpEqual;' => 0x0224F,
	'&hybull;' => 0x02043,
	'&hyphen;' => 0x02010,
	'&iacute;' => 0x000ED,
	'&Iacute;' => 0x000CD,
	'&ic;' => 0x0200B,
	'&icirc;' => 0x000EE,
	'&Icirc;' => 0x000CE,
	'&icy;' => 0x00438,
	'&Icy;' => 0x00418,
	'&Idot;' => 0x00130,
	'&iecy;' => 0x00435,
	'&IEcy;' => 0x00415,
	'&iexcl;' => 0x000A1,
	'&iff;' => 0x021D4,
	'&Ifr;' => 0x02111,
	'&igrave;' => 0x000EC,
	'&Igrave;' => 0x000CC,
	'&ii;' => 0x02148,
	'&iiiint;' => 0x02A0C,
	'&iiint;' => 0x0222D,
	'&iinfin;' => 0x029DC,
	'&iiota;' => 0x02129,
	'&ijlig;' => 0x00133,
	'&IJlig;' => 0x00132,
	'&Im;' => 0x02111,
	'&imacr;' => 0x0012B,
	'&Imacr;' => 0x0012A,
	'&image;' => 0x02111,
	'&ImaginaryI;' => 0x02148,
	'&imagline;' => 0x02110,
	'&imagpart;' => 0x02111,
	'&imath;' => 0x00131,
	'&imof;' => 0x022B7,
	'&Implies;' => 0x021D2,
	'&in;' => 0x02208,
	'&incare;' => 0x02105,
	'&infin;' => 0x0221E,
	'&inodot;' => 0x00131,
	'&int;' => 0x0222B,
	'&Int;' => 0x0222C,
	'&intcal;' => 0x022BA,
	'&integers;' => 0x02124,
	'&Integral;' => 0x0222B,
	'&intercal;' => 0x022BA,
	'&Intersection;' => 0x022C2,
	'&intlarhk;' => 0x02A17,
	'&intprod;' => 0x02A3C,
	'&InvisibleComma;' => 0x0200B,
	'&InvisibleTimes;' => 0x02062,
	'&iocy;' => 0x00451,
	'&IOcy;' => 0x00401,
	'&iogon;' => 0x0012F,
	'&Iogon;' => 0x0012E,
	'&iota;' => 0x003B9,
	'&iprod;' => 0x02A3C,
	'&iquest;' => 0x000BF,
	'&Iscr;' => 0x02110,
	'&isin;' => 0x02208,
	'&isindot;' => 0x022F5,
	'&isinE;' => 0x022F9,
	'&isins;' => 0x022F4,
	'&isinsv;' => 0x022F3,
	'&isinv;' => 0x02208,
	'&it;' => 0x02062,
	'&itilde;' => 0x00129,
	'&Itilde;' => 0x00128,
	'&iukcy;' => 0x00456,
	'&Iukcy;' => 0x00406,
	'&iuml;' => 0x000EF,
	'&Iuml;' => 0x000CF,
	'&jcirc;' => 0x00135,
	'&Jcirc;' => 0x00134,
	'&jcy;' => 0x00439,
	'&Jcy;' => 0x00419,
	'&jmath;' => 0x0006,
	'&jsercy;' => 0x00458,
	'&Jsercy;' => 0x00408,
	'&jukcy;' => 0x00454,
	'&Jukcy;' => 0x00404,
	'&kappa;' => 0x003BA,
	'&kappav;' => 0x003F0,
	'&kcedil;' => 0x00137,
	'&Kcedil;' => 0x00136,
	'&kcy;' => 0x0043A,
	'&Kcy;' => 0x0041A,
	'&kgreen;' => 0x00138,
	'&khcy;' => 0x00445,
	'&KHcy;' => 0x00425,
	'&kjcy;' => 0x0045C,
	'&KJcy;' => 0x0040C,
	'&lAarr;' => 0x021DA,
	'&lacute;' => 0x0013A,
	'&Lacute;' => 0x00139,
	'&laemptyv;' => 0x029B4,
	'&lagran;' => 0x02112,
	'&lambda;' => 0x003BB,
	'&Lambda;' => 0x0039B,
	'&lang;' => 0x02329,
	'&Lang;' => 0x0300A,
	'&langd;' => 0x02991,
	'&langle;' => 0x02329,
	'&lap;' => 0x02272,
	'&Laplacetrf;' => 0x02112,
	'&laquo;' => 0x000AB,
	'&larr;' => 0x02190,
	'&lArr;' => 0x021D0,
	'&Larr;' => 0x0219E,
	'&larrb;' => 0x021E4,
	'&larrbfs;' => 0x0291F,
	'&larrfs;' => 0x0291D,
	'&larrhk;' => 0x021A9,
	'&larrlp;' => 0x021AB,
	'&larrpl;' => 0x02939,
	'&larrsim;' => 0x02973,
	'&larrtl;' => 0x021A2,
	'&lat;' => 0x02AAB,
	'&latail;' => 0x02919,
	'&lAtail;' => 0x0291B,
	'&late;' => 0x02AAD,
	'&lates;' => 0x02AA,
	'&lbarr;' => 0x0290C,
	'&lBarr;' => 0x0290E,
	'&lbbrk;' => 0x03014,
	'&lbrace;' => 0x0007B,
	'&lbrack;' => 0x0005B,
	'&lbrke;' => 0x0298B,
	'&lbrksld;' => 0x0298F,
	'&lbrkslu;' => 0x0298D,
	'&lcaron;' => 0x0013E,
	'&Lcaron;' => 0x0013D,
	'&lcedil;' => 0x0013C,
	'&Lcedil;' => 0x0013B,
	'&lceil;' => 0x02308,
	'&lcub;' => 0x0007B,
	'&lcy;' => 0x0043B,
	'&Lcy;' => 0x0041B,
	'&ldca;' => 0x02936,
	'&ldquo;' => 0x0201C,
	'&ldquor;' => 0x0201E,
	'&ldrdhar;' => 0x02967,
	'&ldrushar;' => 0x0294B,
	'&ldsh;' => 0x021B2,
	'&le;' => 0x02264,
	'&lE;' => 0x02266,
	'&LeftAngleBracket;' => 0x02329,
	'&leftarrow;' => 0x02190,
	'&Leftarrow;' => 0x021D0,
	'&LeftArrow;' => 0x02190,
	'&LeftArrowBar;' => 0x021E4,
	'&LeftArrowRightArrow;' => 0x021C6,
	'&leftarrowtail;' => 0x021A2,
	'&LeftCeiling;' => 0x02308,
	'&LeftDoubleBracket;' => 0x0301A,
	'&LeftDownTeeVector;' => 0x02961,
	'&LeftDownVector;' => 0x021C3,
	'&LeftDownVectorBar;' => 0x02959,
	'&LeftFloor;' => 0x0230A,
	'&leftharpoondown;' => 0x021BD,
	'&leftharpoonup;' => 0x021BC,
	'&leftleftarrows;' => 0x021C7,
	'&leftrightarrow;' => 0x02194,
	'&Leftrightarrow;' => 0x021D4,
	'&LeftRightArrow;' => 0x02194,
	'&leftrightarrows;' => 0x021C6,
	'&leftrightharpoons;' => 0x021CB,
	'&leftrightsquigarrow;' => 0x021AD,
	'&LeftRightVector;' => 0x0294E,
	'&LeftTee;' => 0x022A3,
	'&LeftTeeArrow;' => 0x021A4,
	'&LeftTeeVector;' => 0x0295A,
	'&leftthreetimes;' => 0x022CB,
	'&LeftTriangle;' => 0x022B2,
	'&LeftTriangleBar;' => 0x029CF,
	'&LeftTriangleEqual;' => 0x022B4,
	'&LeftUpDownVector;' => 0x02951,
	'&LeftUpTeeVector;' => 0x02960,
	'&LeftUpVector;' => 0x021BF,
	'&LeftUpVectorBar;' => 0x02958,
	'&LeftVector;' => 0x021BC,
	'&LeftVectorBar;' => 0x02952,
	'&leg;' => 0x022DA,
	'&lEg;' => 0x022DA,
	'&leq;' => 0x02264,
	'&leqq;' => 0x02266,
	'&leqslant;' => 0x02A7D,
	'&les;' => 0x02A7D,
	'&lescc;' => 0x02AA8,
	'&lesdot;' => 0x02A7F,
	'&lesdoto;' => 0x02A81,
	'&lesdotor;' => 0x02A83,
	'&lesg;' => 0x022D,
	'&lesges;' => 0x02A93,
	'&lessapprox;' => 0x02272,
	'&lessdot;' => 0x022D6,
	'&lesseqgtr;' => 0x022DA,
	'&lesseqqgtr;' => 0x022DA,
	'&LessEqualGreater;' => 0x022DA,
	'&LessFullEqual;' => 0x02266,
	'&LessGreater;' => 0x02276,
	'&lessgtr;' => 0x02276,
	'&LessLess;' => 0x02AA1,
	'&lesssim;' => 0x02272,
	'&LessSlantEqual;' => 0x02A7D,
	'&LessTilde;' => 0x02272,
	'&lfisht;' => 0x0297C,
	'&lfloor;' => 0x0230A,
	'&lg;' => 0x02276,
	'&lgE;' => 0x02A91,
	'&lHar;' => 0x02962,
	'&lhard;' => 0x021BD,
	'&lharu;' => 0x021BC,
	'&lharul;' => 0x0296A,
	'&lhblk;' => 0x02584,
	'&ljcy;' => 0x00459,
	'&LJcy;' => 0x00409,
	'&ll;' => 0x0226A,
	'&Ll;' => 0x022D8,
	'&llarr;' => 0x021C7,
	'&llcorner;' => 0x0231E,
	'&Lleftarrow;' => 0x021DA,
	'&llhard;' => 0x0296B,
	'&lltri;' => 0x025FA,
	'&lmidot;' => 0x00140,
	'&Lmidot;' => 0x0013F,
	'&lmoust;' => 0x023B0,
	'&lmoustache;' => 0x023B0,
	'&lnap;' => 0x02A89,
	'&lnapprox;' => 0x02A89,
	'&lne;' => 0x02268,
	'&lnE;' => 0x02268,
	'&lneq;' => 0x02268,
	'&lneqq;' => 0x02268,
	'&lnsim;' => 0x022E6,
	'&loang;' => 0x0F558,
	'&loarr;' => 0x021FD,
	'&lobrk;' => 0x0301A,
	'&longleftarrow;' => 0x0F576,
	'&Longleftarrow;' => 0x0F579,
	'&LongLeftArrow;' => 0x0F576,
	'&longleftrightarrow;' => 0x0F578,
	'&Longleftrightarrow;' => 0x0F57B,
	'&LongLeftRightArrow;' => 0x0F578,
	'&longmapsto;' => 0x0F57D,
	'&longrightarrow;' => 0x0F577,
	'&Longrightarrow;' => 0x0F57A,
	'&LongRightArrow;' => 0x0F577,
	'&looparrowleft;' => 0x021AB,
	'&looparrowright;' => 0x021AC,
	'&lopar;' => 0x03018,
	'&loplus;' => 0x02A2D,
	'&lotimes;' => 0x02A34,
	'&lowast;' => 0x02217,
	'&lowbar;' => 0x0005F,
	'&LowerLeftArrow;' => 0x02199,
	'&LowerRightArrow;' => 0x02198,
	'&loz;' => 0x025CA,
	'&lozenge;' => 0x025CA,
	'&lozf;' => 0x029EB,
	'&lpar;' => 0x00028,
	'&lparlt;' => 0x02993,
	'&lrarr;' => 0x021C6,
	'&lrcorner;' => 0x0231F,
	'&lrhar;' => 0x021CB,
	'&lrhard;' => 0x0296D,
	'&lrtri;' => 0x022BF,
	'&lscr;' => 0x02113,
	'&Lscr;' => 0x02112,
	'&lsh;' => 0x021B0,
	'&Lsh;' => 0x021B0,
	'&lsim;' => 0x02272,
	'&lsime;' => 0x02A8D,
	'&lsimg;' => 0x02A8F,
	'&lsqb;' => 0x0005B,
	'&lsquo;' => 0x02018,
	'&lsquor;' => 0x0201A,
	'&lstrok;' => 0x00142,
	'&Lstrok;' => 0x00141,
	'&lt;' => 0x0003C,
	'&Lt;' => 0x0226A,
	'&ltcc;' => 0x02AA6,
	'&ltcir;' => 0x02A79,
	'&ltdot;' => 0x022D6,
	'&lthree;' => 0x022CB,
	'&ltimes;' => 0x022C9,
	'&ltlarr;' => 0x02976,
	'&ltquest;' => 0x02A7B,
	'&ltri;' => 0x025C3,
	'&ltrie;' => 0x022B4,
	'&ltrif;' => 0x025C2,
	'&ltrPar;' => 0x02996,
	'&lurdshar;' => 0x0294A,
	'&luruhar;' => 0x02966,
	'&lvertneqq;' => 0x0226,
	'&lvnE;' => 0x0226,
	'&macr;' => 0x000AF,
	'&male;' => 0x02642,
	'&malt;' => 0x02720,
	'&maltese;' => 0x02720,
	'&map;' => 0x021A6,
	'&Map;' => 0x02905,
	'&mapsto;' => 0x021A6,
	'&mapstodown;' => 0x021A7,
	'&mapstoleft;' => 0x021A4,
	'&mapstoup;' => 0x021A5,
	'&marker;' => 0x025AE,
	'&mcomma;' => 0x02A29,
	'&mcy;' => 0x0043C,
	'&Mcy;' => 0x0041C,
	'&mdash;' => 0x02014,
	'&mDDot;' => 0x0223A,
	'&measuredangle;' => 0x02221,
	'&MediumSpace;' => 0x0205F,
	'&Mellintrf;' => 0x02133,
	'&mho;' => 0x02127,
	'&micro;' => 0x000B5,
	'&mid;' => 0x02223,
	'&midast;' => 0x0002A,
	'&midcir;' => 0x02AF0,
	'&middot;' => 0x000B7,
	'&minus;' => 0x02212,
	'&minusb;' => 0x0229F,
	'&minusd;' => 0x02238,
	'&minusdu;' => 0x02A2A,
	'&MinusPlus;' => 0x02213,
	'&mlcp;' => 0x02ADB,
	'&mldr;' => 0x02026,
	'&mnplus;' => 0x02213,
	'&models;' => 0x022A7,
	'&mp;' => 0x02213,
	'&Mscr;' => 0x02133,
	'&mstpos;' => 0x0223E,
	'&mu;' => 0x003BC,
	'&multimap;' => 0x022B8,
	'&mumap;' => 0x022B8,
	'&nabla;' => 0x02207,
	'&nacute;' => 0x00144,
	'&Nacute;' => 0x00143,
	'&nang;' => 0x0222,
	'&nap;' => 0x02249,
	'&napE;' => 0x02A7,
	'&napid;' => 0x0224,
	'&napos;' => 0x00149,
	'&napprox;' => 0x02249,
	'&natur;' => 0x0266E,
	'&natural;' => 0x0266E,
	'&naturals;' => 0x02115,
	'&nbsp;' => 0x000A0,
	'&nbump;' => 0x0224,
	'&nbumpe;' => 0x0224,
	'&ncap;' => 0x02A43,
	'&ncaron;' => 0x00148,
	'&Ncaron;' => 0x00147,
	'&ncedil;' => 0x00146,
	'&Ncedil;' => 0x00145,
	'&ncong;' => 0x02247,
	'&ncongdot;' => 0x02A6,
	'&ncup;' => 0x02A42,
	'&ncy;' => 0x0043D,
	'&Ncy;' => 0x0041D,
	'&ndash;' => 0x02013,
	'&ne;' => 0x02260,
	'&nearhk;' => 0x02924,
	'&nearr;' => 0x02197,
	'&neArr;' => 0x021D7,
	'&nearrow;' => 0x02197,
	'&nedot;' => 0x0226,
	'&NegativeMediumSpace;' => 0x0205,
	'&NegativeThickSpace;' => 0x0200,
	'&NegativeThinSpace;' => 0x0200,
	'&NegativeVeryThinSpace;' => 0x0200,
	'&nequiv;' => 0x02262,
	'&nesear;' => 0x02928,
	'&nesim;' => 0x0224,
	'&NestedGreaterGreater;' => 0x0226B,
	'&NestedLessLess;' => 0x0226A,
	'&NewLine;' => 0x0000A,
	'&nexist;' => 0x02204,
	'&nexists;' => 0x02204,
	'&nge;' => 0x0227,
	'&ngE;' => 0x02271,
	'&ngeq;' => 0x0227,
	'&ngeqq;' => 0x02271,
	'&ngeqslant;' => 0x02271,
	'&nges;' => 0x02271,
	'&nGg;' => 0x022D,
	'&ngsim;' => 0x02275,
	'&ngt;' => 0x0226F,
	'&nGt;' => 0x0226,
	'&ngtr;' => 0x0226F,
	'&nGtv;' => 0x0226B,
	'&nharr;' => 0x021AE,
	'&nhArr;' => 0x021CE,
	'&nhpar;' => 0x02AF2,
	'&ni;' => 0x0220B,
	'&nis;' => 0x022FC,
	'&nisd;' => 0x022FA,
	'&niv;' => 0x0220B,
	'&njcy;' => 0x0045A,
	'&NJcy;' => 0x0040A,
	'&nlarr;' => 0x0219A,
	'&nlArr;' => 0x021CD,
	'&nldr;' => 0x02025,
	'&nle;' => 0x0227,
	'&nlE;' => 0x02270,
	'&nleftarrow;' => 0x0219A,
	'&nLeftarrow;' => 0x021CD,
	'&nleftrightarrow;' => 0x021AE,
	'&nLeftrightarrow;' => 0x021CE,
	'&nleq;' => 0x0227,
	'&nleqq;' => 0x02270,
	'&nleqslant;' => 0x02270,
	'&nles;' => 0x02270,
	'&nless;' => 0x0226E,
	'&nLl;' => 0x022D,
	'&nlsim;' => 0x02274,
	'&nlt;' => 0x0226E,
	'&nLt;' => 0x0226,
	'&nltri;' => 0x022EA,
	'&nltrie;' => 0x022EC,
	'&nLtv;' => 0x0226A,
	'&nmid;' => 0x02224,
	'&NoBreak;' => 0x0FEFF,
	'&NonBreakingSpace;' => 0x000A0,
	'&Nopf;' => 0x02115,
	'&not;' => 0x000AC,
	'&Not;' => 0x02AEC,
	'&NotCongruent;' => 0x02262,
	'&NotCupCap;' => 0x0226D,
	'&NotDoubleVerticalBar;' => 0x02226,
	'&NotElement;' => 0x02209,
	'&NotEqual;' => 0x02260,
	'&NotEqualTilde;' => 0x0224,
	'&NotExists;' => 0x02204,
	'&NotGreater;' => 0x0226F,
	'&NotGreaterEqual;' => 0x0227,
	'&NotGreaterFullEqual;' => 0x02270,
	'&NotGreaterGreater;' => 0x0226B,
	'&NotGreaterLess;' => 0x02279,
	'&NotGreaterSlantEqual;' => 0x02271,
	'&NotGreaterTilde;' => 0x02275,
	'&NotHumpDownHump;' => 0x0224,
	'&NotHumpEqual;' => 0x0224,
	'&notin;' => 0x02209,
	'&notindot;' => 0x022F,
	'&notinva;' => 0x0220,
	'&notinvb;' => 0x022F7,
	'&notinvc;' => 0x022F6,
	'&NotLeftTriangle;' => 0x022EA,
	'&NotLeftTriangleBar;' => 0x029C,
	'&NotLeftTriangleEqual;' => 0x022EC,
	'&NotLess;' => 0x0226E,
	'&NotLessEqual;' => 0x0227,
	'&NotLessGreater;' => 0x02278,
	'&NotLessLess;' => 0x0226A,
	'&NotLessSlantEqual;' => 0x02270,
	'&NotLessTilde;' => 0x02274,
	'&NotNestedGreaterGreater;' => 0x024A,
	'&NotNestedLessLess;' => 0x024A,
	'&notni;' => 0x0220C,
	'&notniva;' => 0x0220C,
	'&notnivb;' => 0x022FE,
	'&notnivc;' => 0x022FD,
	'&NotPrecedes;' => 0x02280,
	'&NotPrecedesEqual;' => 0x02AA,
	'&NotPrecedesSlantEqual;' => 0x022E0,
	'&NotReverseElement;' => 0x0220C,
	'&NotRightTriangle;' => 0x022EB,
	'&NotRightTriangleBar;' => 0x029D,
	'&NotRightTriangleEqual;' => 0x022ED,
	'&NotSquareSubset;' => 0x0228,
	'&NotSquareSubsetEqual;' => 0x022E2,
	'&NotSquareSuperset;' => 0x0229,
	'&NotSquareSupersetEqual;' => 0x022E3,
	'&NotSubset;' => 0x02284,
	'&NotSubsetEqual;' => 0x02288,
	'&NotSucceeds;' => 0x02281,
	'&NotSucceedsEqual;' => 0x02AB,
	'&NotSucceedsSlantEqual;' => 0x022E1,
	'&NotSucceedsTilde;' => 0x0227,
	'&NotSuperset;' => 0x02285,
	'&NotSupersetEqual;' => 0x02289,
	'&NotTilde;' => 0x02241,
	'&NotTildeEqual;' => 0x02244,
	'&NotTildeFullEqual;' => 0x02247,
	'&NotTildeTilde;' => 0x02249,
	'&NotVerticalBar;' => 0x02224,
	'&npar;' => 0x02226,
	'&nparallel;' => 0x02226,
	'&nparsl;' => 0x02225,
	'&npart;' => 0x0220,
	'&npolint;' => 0x02A14,
	'&npr;' => 0x02280,
	'&nprcue;' => 0x022E0,
	'&npre;' => 0x02AA,
	'&nprec;' => 0x02280,
	'&npreceq;' => 0x02AA,
	'&nrarr;' => 0x0219B,
	'&nrArr;' => 0x021CF,
	'&nrarrc;' => 0x0293,
	'&nrarrw;' => 0x0219,
	'&nrightarrow;' => 0x0219B,
	'&nRightarrow;' => 0x021CF,
	'&nrtri;' => 0x022EB,
	'&nrtrie;' => 0x022ED,
	'&nsc;' => 0x02281,
	'&nsccue;' => 0x022E1,
	'&nsce;' => 0x02AB,
	'&nshortmid;' => 0x0222,
	'&nshortparallel;' => 0x0222,
	'&nsim;' => 0x02241,
	'&nsime;' => 0x02244,
	'&nsimeq;' => 0x02244,
	'&nsmid;' => 0x0222,
	'&nspar;' => 0x0222,
	'&nsqsube;' => 0x022E2,
	'&nsqsupe;' => 0x022E3,
	'&nsub;' => 0x02284,
	'&nsube;' => 0x02288,
	'&nsubE;' => 0x02288,
	'&nsubset;' => 0x02284,
	'&nsubseteq;' => 0x02288,
	'&nsubseteqq;' => 0x02288,
	'&nsucc;' => 0x02281,
	'&nsucceq;' => 0x02AB,
	'&nsup;' => 0x02285,
	'&nsupe;' => 0x02289,
	'&nsupE;' => 0x02289,
	'&nsupset;' => 0x02285,
	'&nsupseteq;' => 0x02289,
	'&nsupseteqq;' => 0x02289,
	'&ntgl;' => 0x02279,
	'&ntilde;' => 0x000F1,
	'&Ntilde;' => 0x000D1,
	'&ntlg;' => 0x02278,
	'&ntriangleleft;' => 0x022EA,
	'&ntrianglelefteq;' => 0x022EC,
	'&ntriangleright;' => 0x022EB,
	'&ntrianglerighteq;' => 0x022ED,
	'&nu;' => 0x003BD,
	'&num;' => 0x00023,
	'&numero;' => 0x02116,
	'&numsp;' => 0x02007,
	'&nvap;' => 0x0224,
	'&nvdash;' => 0x022AC,
	'&nvDash;' => 0x022AD,
	'&nVdash;' => 0x022AE,
	'&nVDash;' => 0x022AF,
	'&nvge;' => 0x02271,
	'&nvgt;' => 0x0226F,
	'&nvHarr;' => 0x021CE,
	'&nvinfin;' => 0x029DE,
	'&nvlArr;' => 0x021CD,
	'&nvle;' => 0x02270,
	'&nvlt;' => 0x0226E,
	'&nvltrie;' => 0x022E,
	'&nvrArr;' => 0x021CF,
	'&nvrtrie;' => 0x022E,
	'&nvsim;' => 0x0224,
	'&nwarhk;' => 0x02923,
	'&nwarr;' => 0x02196,
	'&nwArr;' => 0x021D6,
	'&nwarrow;' => 0x02196,
	'&nwnear;' => 0x02927,
	'&oacute;' => 0x000F3,
	'&Oacute;' => 0x000D3,
	'&oast;' => 0x0229B,
	'&ocir;' => 0x0229A,
	'&ocirc;' => 0x000F4,
	'&Ocirc;' => 0x000D4,
	'&ocy;' => 0x0043E,
	'&Ocy;' => 0x0041E,
	'&odash;' => 0x0229D,
	'&odblac;' => 0x00151,
	'&Odblac;' => 0x00150,
	'&odiv;' => 0x02A38,
	'&odot;' => 0x02299,
	'&odsold;' => 0x029BC,
	'&oelig;' => 0x00153,
	'&OElig;' => 0x00152,
	'&ofcir;' => 0x029BF,
	'&ogon;' => 0x002DB,
	'&ograve;' => 0x000F2,
	'&Ograve;' => 0x000D2,
	'&ogt;' => 0x029C1,
	'&ohbar;' => 0x029B5,
	'&ohm;' => 0x02126,
	'&oint;' => 0x0222E,
	'&olarr;' => 0x021BA,
	'&olcir;' => 0x029BE,
	'&olcross;' => 0x029BB,
	'&olt;' => 0x029C0,
	'&omacr;' => 0x0014D,
	'&Omacr;' => 0x0014C,
	'&omega;' => 0x003C9,
	'&Omega;' => 0x003A9,
	'&omid;' => 0x029B6,
	'&ominus;' => 0x02296,
	'&opar;' => 0x029B7,
	'&OpenCurlyDoubleQuote;' => 0x0201C,
	'&OpenCurlyQuote;' => 0x02018,
	'&operp;' => 0x029B9,
	'&oplus;' => 0x02295,
	'&or;' => 0x02228,
	'&Or;' => 0x02A54,
	'&orarr;' => 0x021BB,
	'&ord;' => 0x02A5D,
	'&order;' => 0x02134,
	'&orderof;' => 0x02134,
	'&ordf;' => 0x000AA,
	'&ordm;' => 0x000BA,
	'&origof;' => 0x022B6,
	'&oror;' => 0x02A56,
	'&orslope;' => 0x02A57,
	'&orv;' => 0x02A5B,
	'&oS;' => 0x024C8,
	'&oscr;' => 0x02134,
	'&oslash;' => 0x000F8,
	'&Oslash;' => 0x000D8,
	'&osol;' => 0x02298,
	'&otilde;' => 0x000F5,
	'&Otilde;' => 0x000D5,
	'&otimes;' => 0x02297,
	'&Otimes;' => 0x02A37,
	'&otimesas;' => 0x02A36,
	'&ouml;' => 0x000F6,
	'&Ouml;' => 0x000D6,
	'&ovbar;' => 0x0233D,
	'&OverBar;' => 0x000AF,
	'&OverBrace;' => 0x0FE37,
	'&OverBracket;' => 0x023B4,
	'&OverParenthesis;' => 0x0FE35,
	'&par;' => 0x02225,
	'&para;' => 0x000B6,
	'&parallel;' => 0x02225,
	'&parsim;' => 0x02AF3,
	'&parsl;' => 0x02225,
	'&part;' => 0x02202,
	'&PartialD;' => 0x02202,
	'&pcy;' => 0x0043F,
	'&Pcy;' => 0x0041F,
	'&percnt;' => 0x00025,
	'&period;' => 0x0002E,
	'&permil;' => 0x02030,
	'&perp;' => 0x022A5,
	'&pertenk;' => 0x02031,
	'&phi;' => 0x003C6,
	'&Phi;' => 0x003A6,
	'&phiv;' => 0x003D5,
	'&phmmat;' => 0x02133,
	'&phone;' => 0x0260E,
	'&pi;' => 0x003C0,
	'&Pi;' => 0x003A0,
	'&pitchfork;' => 0x022D4,
	'&piv;' => 0x003D6,
	'&planck;' => 0x0210,
	'&planckh;' => 0x0210E,
	'&plankv;' => 0x0210F,
	'&plus;' => 0x0002B,
	'&plusacir;' => 0x02A23,
	'&plusb;' => 0x0229E,
	'&pluscir;' => 0x02A22,
	'&plusdo;' => 0x02214,
	'&plusdu;' => 0x02A25,
	'&pluse;' => 0x02A72,
	'&PlusMinus;' => 0x000B1,
	'&plusmn;' => 0x000B1,
	'&plussim;' => 0x02A26,
	'&plustwo;' => 0x02A27,
	'&pm;' => 0x000B1,
	'&Poincareplane;' => 0x0210C,
	'&pointint;' => 0x02A15,
	'&Popf;' => 0x02119,
	'&pound;' => 0x000A3,
	'&pr;' => 0x0227A,
	'&Pr;' => 0x02ABB,
	'&prap;' => 0x0227E,
	'&prcue;' => 0x0227C,
	'&pre;' => 0x02AAF,
	'&prE;' => 0x02AAF,
	'&prec;' => 0x0227A,
	'&precapprox;' => 0x0227E,
	'&preccurlyeq;' => 0x0227C,
	'&Precedes;' => 0x0227A,
	'&PrecedesEqual;' => 0x02AAF,
	'&PrecedesSlantEqual;' => 0x0227C,
	'&PrecedesTilde;' => 0x0227E,
	'&preceq;' => 0x02AAF,
	'&precnapprox;' => 0x022E8,
	'&precneqq;' => 0x02AB5,
	'&precnsim;' => 0x022E8,
	'&precsim;' => 0x0227E,
	'&prime;' => 0x02032,
	'&Prime;' => 0x02033,
	'&primes;' => 0x02119,
	'&prnap;' => 0x022E8,
	'&prnE;' => 0x02AB5,
	'&prnsim;' => 0x022E8,
	'&prod;' => 0x0220F,
	'&Product;' => 0x0220F,
	'&profalar;' => 0x0232E,
	'&profline;' => 0x02312,
	'&profsurf;' => 0x02313,
	'&prop;' => 0x0221D,
	'&Proportion;' => 0x02237,
	'&Proportional;' => 0x0221D,
	'&propto;' => 0x0221D,
	'&prsim;' => 0x0227E,
	'&prurel;' => 0x022B0,
	'&psi;' => 0x003C8,
	'&Psi;' => 0x003A8,
	'&puncsp;' => 0x02008,
	'&qint;' => 0x02A0C,
	'&Qopf;' => 0x0211A,
	'&qprime;' => 0x02057,
	'&quaternions;' => 0x0210D,
	'&quatint;' => 0x02A16,
	'&quest;' => 0x0003F,
	'&questeq;' => 0x0225F,
	'&quot;' => 0x00022,
	'&rAarr;' => 0x021DB,
	'&race;' => 0x029DA,
	'&racute;' => 0x00155,
	'&Racute;' => 0x00154,
	'&radic;' => 0x0221A,
	'&raemptyv;' => 0x029B3,
	'&rang;' => 0x0232A,
	'&Rang;' => 0x0300B,
	'&rangd;' => 0x02992,
	'&range;' => 0x029A5,
	'&rangle;' => 0x0232A,
	'&raquo;' => 0x000BB,
	'&rarr;' => 0x02192,
	'&rArr;' => 0x021D2,
	'&Rarr;' => 0x021A0,
	'&rarrap;' => 0x02975,
	'&rarrb;' => 0x021E5,
	'&rarrbfs;' => 0x02920,
	'&rarrc;' => 0x02933,
	'&rarrfs;' => 0x0291E,
	'&rarrhk;' => 0x021AA,
	'&rarrlp;' => 0x021AC,
	'&rarrpl;' => 0x02945,
	'&rarrsim;' => 0x02974,
	'&rarrtl;' => 0x021A3,
	'&Rarrtl;' => 0x02916,
	'&rarrw;' => 0x0219D,
	'&ratail;' => 0x021A3,
	'&rAtail;' => 0x0291C,
	'&ratio;' => 0x02236,
	'&rationals;' => 0x0211A,
	'&rbarr;' => 0x0290D,
	'&rBarr;' => 0x0290F,
	'&RBarr;' => 0x02910,
	'&rbbrk;' => 0x03015,
	'&rbrace;' => 0x0007D,
	'&rbrack;' => 0x0005D,
	'&rbrke;' => 0x0298C,
	'&rbrksld;' => 0x0298E,
	'&rbrkslu;' => 0x02990,
	'&rcaron;' => 0x00159,
	'&Rcaron;' => 0x00158,
	'&rcedil;' => 0x00157,
	'&Rcedil;' => 0x00156,
	'&rceil;' => 0x02309,
	'&rcub;' => 0x0007D,
	'&rcy;' => 0x00440,
	'&Rcy;' => 0x00420,
	'&rdca;' => 0x02937,
	'&rdldhar;' => 0x02969,
	'&rdquo;' => 0x0201D,
	'&rdquor;' => 0x0201D,
	'&rdsh;' => 0x021B3,
	'&Re;' => 0x0211C,
	'&real;' => 0x0211C,
	'&realine;' => 0x0211B,
	'&realpart;' => 0x0211C,
	'&reals;' => 0x0211D,
	'&rect;' => 0x025AD,
	'&reg;' => 0x000AE,
	'&ReverseElement;' => 0x0220B,
	'&ReverseEquilibrium;' => 0x021CB,
	'&ReverseUpEquilibrium;' => 0x0296F,
	'&rfisht;' => 0x0297D,
	'&rfloor;' => 0x0230B,
	'&Rfr;' => 0x0211C,
	'&rHar;' => 0x02964,
	'&rhard;' => 0x021C1,
	'&rharu;' => 0x021C0,
	'&rharul;' => 0x0296C,
	'&rho;' => 0x003C1,
	'&rhov;' => 0x003F1,
	'&RightAngleBracket;' => 0x0232A,
	'&rightarrow;' => 0x02192,
	'&Rightarrow;' => 0x021D2,
	'&RightArrow;' => 0x02192,
	'&RightArrowBar;' => 0x021E5,
	'&RightArrowLeftArrow;' => 0x021C4,
	'&rightarrowtail;' => 0x021A3,
	'&RightCeiling;' => 0x02309,
	'&RightDoubleBracket;' => 0x0301B,
	'&RightDownTeeVector;' => 0x0295D,
	'&RightDownVector;' => 0x021C2,
	'&RightDownVectorBar;' => 0x02955,
	'&RightFloor;' => 0x0230B,
	'&rightharpoondown;' => 0x021C1,
	'&rightharpoonup;' => 0x021C0,
	'&rightleftarrows;' => 0x021C4,
	'&rightleftharpoons;' => 0x021CC,
	'&rightrightarrows;' => 0x021C9,
	'&rightsquigarrow;' => 0x0219D,
	'&RightTee;' => 0x022A2,
	'&RightTeeArrow;' => 0x021A6,
	'&RightTeeVector;' => 0x0295B,
	'&rightthreetimes;' => 0x022CC,
	'&RightTriangle;' => 0x022B3,
	'&RightTriangleBar;' => 0x029D0,
	'&RightTriangleEqual;' => 0x022B5,
	'&RightUpDownVector;' => 0x0294F,
	'&RightUpTeeVector;' => 0x0295C,
	'&RightUpVector;' => 0x021BE,
	'&RightUpVectorBar;' => 0x02954,
	'&RightVector;' => 0x021C0,
	'&RightVectorBar;' => 0x02953,
	'&ring;' => 0x002DA,
	'&risingdotseq;' => 0x02253,
	'&rlarr;' => 0x021C4,
	'&rlhar;' => 0x021CC,
	'&rmoust;' => 0x023B1,
	'&rmoustache;' => 0x023B1,
	'&rnmid;' => 0x02AEE,
	'&roang;' => 0x0F559,
	'&roarr;' => 0x021FE,
	'&robrk;' => 0x0301B,
	'&ropar;' => 0x03019,
	'&Ropf;' => 0x0211D,
	'&roplus;' => 0x02A2E,
	'&rotimes;' => 0x02A35,
	'&RoundImplies;' => 0x02970,
	'&rpar;' => 0x00029,
	'&rpargt;' => 0x02994,
	'&rppolint;' => 0x02A12,
	'&rrarr;' => 0x021C9,
	'&Rrightarrow;' => 0x021DB,
	'&Rscr;' => 0x0211B,
	'&rsh;' => 0x021B1,
	'&Rsh;' => 0x021B1,
	'&rsqb;' => 0x0005D,
	'&rsquo;' => 0x02019,
	'&rsquor;' => 0x02019,
	'&rthree;' => 0x022CC,
	'&rtimes;' => 0x022CA,
	'&rtri;' => 0x025B9,
	'&rtrie;' => 0x022B5,
	'&rtrif;' => 0x025B8,
	'&rtriltri;' => 0x029CE,
	'&RuleDelayed;' => 0x029F4,
	'&ruluhar;' => 0x02968,
	'&rx;' => 0x0211E,
	'&sacute;' => 0x0015B,
	'&Sacute;' => 0x0015A,
	'&sc;' => 0x0227B,
	'&Sc;' => 0x02ABC,
	'&scap;' => 0x0227F,
	'&scaron;' => 0x00161,
	'&Scaron;' => 0x00160,
	'&sccue;' => 0x0227D,
	'&sce;' => 0x0227D,
	'&scE;' => 0x0227E,
	'&scedil;' => 0x0015F,
	'&Scedil;' => 0x0015E,
	'&scirc;' => 0x0015D,
	'&Scirc;' => 0x0015C,
	'&scnap;' => 0x022E9,
	'&scnE;' => 0x02AB6,
	'&scnsim;' => 0x022E9,
	'&scpolint;' => 0x02A13,
	'&scsim;' => 0x0227F,
	'&scy;' => 0x00441,
	'&Scy;' => 0x00421,
	'&sdot;' => 0x022C5,
	'&sdotb;' => 0x022A1,
	'&sdote;' => 0x02A66,
	'&searhk;' => 0x02925,
	'&searr;' => 0x02198,
	'&seArr;' => 0x021D8,
	'&searrow;' => 0x02198,
	'&sect;' => 0x000A7,
	'&semi;' => 0x0003B,
	'&seswar;' => 0x02929,
	'&setminus;' => 0x02216,
	'&setmn;' => 0x02216,
	'&sext;' => 0x02736,
	'&sharp;' => 0x0266F,
	'&shchcy;' => 0x00449,
	'&SHCHcy;' => 0x00429,
	'&shcy;' => 0x00448,
	'&SHcy;' => 0x00428,
	'&ShortDownArrow;' => 0x0230,
	'&ShortLeftArrow;' => 0x0219,
	'&shortmid;' => 0x0222,
	'&shortparallel;' => 0x0222,
	'&ShortRightArrow;' => 0x0219,
	'&ShortUpArrow;' => 0x0230,
	'&shy;' => 0x000AD,
	'&sigma;' => 0x003C3,
	'&Sigma;' => 0x003A3,
	'&sigmav;' => 0x003C2,
	'&sim;' => 0x0223C,
	'&simdot;' => 0x02A6A,
	'&sime;' => 0x02243,
	'&simeq;' => 0x02243,
	'&simg;' => 0x02A9E,
	'&simgE;' => 0x02AA0,
	'&siml;' => 0x02A9D,
	'&simlE;' => 0x02A9F,
	'&simne;' => 0x02246,
	'&simplus;' => 0x02A24,
	'&simrarr;' => 0x02972,
	'&slarr;' => 0x0219,
	'&SmallCircle;' => 0x02218,
	'&smallsetminus;' => 0x0221,
	'&smashp;' => 0x02A33,
	'&smeparsl;' => 0x029E4,
	'&smid;' => 0x0222,
	'&smile;' => 0x02323,
	'&smt;' => 0x02AAA,
	'&smte;' => 0x02AAC,
	'&smtes;' => 0x02AA,
	'&softcy;' => 0x0044C,
	'&SOFTcy;' => 0x0042C,
	'&sol;' => 0x0002F,
	'&solb;' => 0x029C4,
	'&solbar;' => 0x0233F,
	'&spades;' => 0x02660,
	'&spadesuit;' => 0x02660,
	'&spar;' => 0x0222,
	'&sqcap;' => 0x02293,
	'&sqcaps;' => 0x0229,
	'&sqcup;' => 0x02294,
	'&sqcups;' => 0x0229,
	'&Sqrt;' => 0x0221A,
	'&sqsub;' => 0x0228F,
	'&sqsube;' => 0x02291,
	'&sqsubset;' => 0x0228F,
	'&sqsubseteq;' => 0x02291,
	'&sqsup;' => 0x02290,
	'&sqsupe;' => 0x02292,
	'&sqsupset;' => 0x02290,
	'&sqsupseteq;' => 0x02292,
	'&squ;' => 0x025A1,
	'&square;' => 0x025A1,
	'&Square;' => 0x025A1,
	'&SquareIntersection;' => 0x02293,
	'&SquareSubset;' => 0x0228F,
	'&SquareSubsetEqual;' => 0x02291,
	'&SquareSuperset;' => 0x02290,
	'&SquareSupersetEqual;' => 0x02292,
	'&SquareUnion;' => 0x02294,
	'&squarf;' => 0x025AA,
	'&squf;' => 0x025AA,
	'&srarr;' => 0x0219,
	'&ssetmn;' => 0x0221,
	'&sstarf;' => 0x022C6,
	'&star;' => 0x022C6,
	'&Star;' => 0x022C6,
	'&starf;' => 0x02605,
	'&straightepsilon;' => 0x003B5,
	'&straightphi;' => 0x003C6,
	'&sub;' => 0x02282,
	'&Sub;' => 0x022D0,
	'&subdot;' => 0x02ABD,
	'&sube;' => 0x02286,
	'&subE;' => 0x02286,
	'&subedot;' => 0x02AC3,
	'&submult;' => 0x02AC1,
	'&subne;' => 0x0228A,
	'&subnE;' => 0x0228A,
	'&subplus;' => 0x02ABF,
	'&subrarr;' => 0x02979,
	'&subset;' => 0x02282,
	'&Subset;' => 0x022D0,
	'&subseteq;' => 0x02286,
	'&subseteqq;' => 0x02286,
	'&SubsetEqual;' => 0x02286,
	'&subsetneq;' => 0x0228A,
	'&subsetneqq;' => 0x0228A,
	'&subsim;' => 0x02AC7,
	'&subsub;' => 0x02AD5,
	'&subsup;' => 0x02AD3,
	'&succ;' => 0x0227B,
	'&succapprox;' => 0x0227F,
	'&succcurlyeq;' => 0x0227D,
	'&Succeeds;' => 0x0227B,
	'&SucceedsEqual;' => 0x0227D,
	'&SucceedsSlantEqual;' => 0x0227D,
	'&SucceedsTilde;' => 0x0227F,
	'&succeq;' => 0x0227D,
	'&succnapprox;' => 0x022E9,
	'&succneqq;' => 0x02AB6,
	'&succnsim;' => 0x022E9,
	'&succsim;' => 0x0227F,
	'&SuchThat;' => 0x0220B,
	'&sum;' => 0x02211,
	'&Sum;' => 0x02211,
	'&sung;' => 0x0266A,
	'&sup;' => 0x02283,
	'&Sup;' => 0x022D1,
	'&sup1;' => 0x000B9,
	'&sup2;' => 0x000B2,
	'&sup3;' => 0x000B3,
	'&supdot;' => 0x02ABE,
	'&supdsub;' => 0x02AD8,
	'&supe;' => 0x02287,
	'&supE;' => 0x02287,
	'&supedot;' => 0x02AC4,
	'&Superset;' => 0x02283,
	'&SupersetEqual;' => 0x02287,
	'&suphsol;' => 0x0228,
	'&suphsub;' => 0x02AD7,
	'&suplarr;' => 0x0297B,
	'&supmult;' => 0x02AC2,
	'&supne;' => 0x0228B,
	'&supnE;' => 0x0228B,
	'&supplus;' => 0x02AC0,
	'&supset;' => 0x02283,
	'&Supset;' => 0x022D1,
	'&supseteq;' => 0x02287,
	'&supseteqq;' => 0x02287,
	'&supsetneq;' => 0x0228B,
	'&supsetneqq;' => 0x0228B,
	'&supsim;' => 0x02AC8,
	'&supsub;' => 0x02AD4,
	'&supsup;' => 0x02AD6,
	'&swarhk;' => 0x02926,
	'&swarr;' => 0x02199,
	'&swArr;' => 0x021D9,
	'&swarrow;' => 0x02199,
	'&swnwar;' => 0x0292A,
	'&szlig;' => 0x000DF,
	'&Tab;' => 0x00009,
	'&target;' => 0x02316,
	'&tau;' => 0x003C4,
	'&tbrk;' => 0x023B4,
	'&tcaron;' => 0x00165,
	'&Tcaron;' => 0x00164,
	'&tcedil;' => 0x00163,
	'&Tcedil;' => 0x00162,
	'&tcy;' => 0x00442,
	'&Tcy;' => 0x00422,
	'&tdot;' => 0x020DB,
	'&telrec;' => 0x02315,
	'&there4;' => 0x02234,
	'&therefore;' => 0x02234,
	'&Therefore;' => 0x02234,
	'&theta;' => 0x003B8,
	'&Theta;' => 0x00398,
	'&thetav;' => 0x003D1,
	'&thickapprox;' => 0x0224,
	'&thicksim;' => 0x0223,
	'&ThickSpace;' => 0x02009,
	'&thinsp;' => 0x02009,
	'&ThinSpace;' => 0x02009,
	'&thkap;' => 0x0224,
	'&thksim;' => 0x0223,
	'&thorn;' => 0x000FE,
	'&THORN;' => 0x000DE,
	'&tilde;' => 0x002DC,
	'&Tilde;' => 0x0223C,
	'&TildeEqual;' => 0x02243,
	'&TildeFullEqual;' => 0x02245,
	'&TildeTilde;' => 0x02248,
	'&times;' => 0x000D7,
	'&timesb;' => 0x022A0,
	'&timesbar;' => 0x02A31,
	'&timesd;' => 0x02A30,
	'&tint;' => 0x0222D,
	'&toea;' => 0x02928,
	'&top;' => 0x022A4,
	'&topbot;' => 0x02336,
	'&topcir;' => 0x02AF1,
	'&topfork;' => 0x02ADA,
	'&tosa;' => 0x02929,
	'&tprime;' => 0x02034,
	'&trade;' => 0x02122,
	'&triangle;' => 0x025B5,
	'&triangledown;' => 0x025BF,
	'&triangleleft;' => 0x025C3,
	'&trianglelefteq;' => 0x022B4,
	'&triangleq;' => 0x0225C,
	'&triangleright;' => 0x025B9,
	'&trianglerighteq;' => 0x022B5,
	'&tridot;' => 0x025EC,
	'&trie;' => 0x0225C,
	'&triminus;' => 0x02A3A,
	'&TripleDot;' => 0x020DB,
	'&triplus;' => 0x02A39,
	'&trisb;' => 0x029CD,
	'&tritime;' => 0x02A3B,
	'&tscy;' => 0x00446,
	'&TScy;' => 0x00426,
	'&tshcy;' => 0x0045B,
	'&TSHcy;' => 0x0040B,
	'&tstrok;' => 0x00167,
	'&Tstrok;' => 0x00166,
	'&twixt;' => 0x0226C,
	'&twoheadleftarrow;' => 0x0219E,
	'&twoheadrightarrow;' => 0x021A0,
	'&uacute;' => 0x000FA,
	'&Uacute;' => 0x000DA,
	'&uarr;' => 0x02191,
	'&uArr;' => 0x021D1,
	'&Uarr;' => 0x0219F,
	'&Uarrocir;' => 0x02949,
	'&ubrcy;' => 0x0045E,
	'&Ubrcy;' => 0x0040E,
	'&ubreve;' => 0x0016D,
	'&Ubreve;' => 0x0016C,
	'&ucirc;' => 0x000FB,
	'&Ucirc;' => 0x000DB,
	'&ucy;' => 0x00443,
	'&Ucy;' => 0x00423,
	'&udarr;' => 0x021C5,
	'&udblac;' => 0x00171,
	'&Udblac;' => 0x00170,
	'&udhar;' => 0x0296E,
	'&ufisht;' => 0x0297E,
	'&ugrave;' => 0x000F9,
	'&Ugrave;' => 0x000D9,
	'&uHar;' => 0x02963,
	'&uharl;' => 0x021BF,
	'&uharr;' => 0x021BE,
	'&uhblk;' => 0x02580,
	'&ulcorn;' => 0x0231C,
	'&ulcorner;' => 0x0231C,
	'&ulcrop;' => 0x0230F,
	'&ultri;' => 0x025F8,
	'&umacr;' => 0x0016B,
	'&Umacr;' => 0x0016A,
	'&uml;' => 0x000A8,
	'&UnderBar;' => 0x00332,
	'&UnderBrace;' => 0x0FE38,
	'&UnderBracket;' => 0x023B5,
	'&UnderParenthesis;' => 0x0FE36,
	'&Union;' => 0x022C3,
	'&UnionPlus;' => 0x0228E,
	'&uogon;' => 0x00173,
	'&Uogon;' => 0x00172,
	'&uparrow;' => 0x02191,
	'&Uparrow;' => 0x021D1,
	'&UpArrow;' => 0x02191,
	'&UpArrowBar;' => 0x02912,
	'&UpArrowDownArrow;' => 0x021C5,
	'&updownarrow;' => 0x02195,
	'&Updownarrow;' => 0x021D5,
	'&UpDownArrow;' => 0x02195,
	'&UpEquilibrium;' => 0x0296E,
	'&upharpoonleft;' => 0x021BF,
	'&upharpoonright;' => 0x021BE,
	'&uplus;' => 0x0228E,
	'&UpperLeftArrow;' => 0x02196,
	'&UpperRightArrow;' => 0x02197,
	'&upsi;' => 0x003C5,
	'&Upsi;' => 0x003D2,
	'&upsilon;' => 0x003C5,
	'&Upsilon;' => 0x003D2,
	'&UpTee;' => 0x022A5,
	'&UpTeeArrow;' => 0x021A5,
	'&upuparrows;' => 0x021C8,
	'&urcorn;' => 0x0231D,
	'&urcorner;' => 0x0231D,
	'&urcrop;' => 0x0230E,
	'&uring;' => 0x0016F,
	'&Uring;' => 0x0016E,
	'&urtri;' => 0x025F9,
	'&utdot;' => 0x022F0,
	'&utilde;' => 0x00169,
	'&Utilde;' => 0x00168,
	'&utri;' => 0x025B5,
	'&utrif;' => 0x025B4,
	'&uuarr;' => 0x021C8,
	'&uuml;' => 0x000FC,
	'&Uuml;' => 0x000DC,
	'&uwangle;' => 0x029A7,
	'&vangrt;' => 0x022BE,
	'&varepsilon;' => 0x0025B,
	'&varkappa;' => 0x003F0,
	'&varnothing;' => 0x02205,
	'&varphi;' => 0x003D5,
	'&varpi;' => 0x003D6,
	'&varpropto;' => 0x0221D,
	'&varr;' => 0x02195,
	'&vArr;' => 0x021D5,
	'&varrho;' => 0x003F1,
	'&varsigma;' => 0x003C2,
	'&varsubsetneq;' => 0x0228A,
	'&varsubsetneqq;' => 0x0228,
	'&varsupsetneq;' => 0x0228,
	'&varsupsetneqq;' => 0x0228B,
	'&vartheta;' => 0x003D1,
	'&vartriangleleft;' => 0x022B2,
	'&vartriangleright;' => 0x022B3,
	'&vBar;' => 0x02AE8,
	'&Vbar;' => 0x02AEB,
	'&vBarv;' => 0x02AE9,
	'&vcy;' => 0x00432,
	'&Vcy;' => 0x00412,
	'&vdash;' => 0x022A2,
	'&vDash;' => 0x022A8,
	'&Vdash;' => 0x022A9,
	'&VDash;' => 0x022AB,
	'&Vdashl;' => 0x02AE6,
	'&vee;' => 0x02228,
	'&Vee;' => 0x022C1,
	'&veebar;' => 0x022BB,
	'&veeeq;' => 0x0225A,
	'&vellip;' => 0x022EE,
	'&verbar;' => 0x0007C,
	'&Verbar;' => 0x02016,
	'&vert;' => 0x0007C,
	'&Vert;' => 0x02016,
	'&VerticalBar;' => 0x02223,
	'&VerticalLine;' => 0x0007C,
	'&VerticalSeparator;' => 0x02758,
	'&VerticalTilde;' => 0x02240,
	'&VeryThinSpace;' => 0x0200A,
	'&vltri;' => 0x022B2,
	'&vnsub;' => 0x02284,
	'&vnsup;' => 0x02285,
	'&vprop;' => 0x0221D,
	'&vrtri;' => 0x022B3,
	'&vsubne;' => 0x0228A,
	'&vsubnE;' => 0x0228,
	'&vsupne;' => 0x0228,
	'&vsupnE;' => 0x0228B,
	'&Vvdash;' => 0x022AA,
	'&vzigzag;' => 0x0299A,
	'&wcirc;' => 0x00175,
	'&Wcirc;' => 0x00174,
	'&wedbar;' => 0x02A5F,
	'&wedge;' => 0x02227,
	'&Wedge;' => 0x022C0,
	'&wedgeq;' => 0x02259,
	'&weierp;' => 0x02118,
	'&wp;' => 0x02118,
	'&wr;' => 0x02240,
	'&wreath;' => 0x02240,
	'&xcap;' => 0x022C2,
	'&xcirc;' => 0x025EF,
	'&xcup;' => 0x022C3,
	'&xdtri;' => 0x025BD,
	'&xharr;' => 0x0F578,
	'&xhArr;' => 0x0F57B,
	'&xi;' => 0x003BE,
	'&Xi;' => 0x0039E,
	'&xlarr;' => 0x0F576,
	'&xlArr;' => 0x0F579,
	'&xmap;' => 0x0F57D,
	'&xnis;' => 0x022FB,
	'&xodot;' => 0x02299,
	'&xoplus;' => 0x02295,
	'&xotime;' => 0x02297,
	'&xrarr;' => 0x0F577,
	'&xrArr;' => 0x0F57A,
	'&xsqcup;' => 0x02294,
	'&xuplus;' => 0x0228E,
	'&xutri;' => 0x025B3,
	'&xvee;' => 0x022C1,
	'&xwedge;' => 0x022C0,
	'&yacute;' => 0x000FD,
	'&Yacute;' => 0x000DD,
	'&yacy;' => 0x0044F,
	'&YAcy;' => 0x0042F,
	'&ycirc;' => 0x00177,
	'&Ycirc;' => 0x00176,
	'&ycy;' => 0x0044B,
	'&Ycy;' => 0x0042B,
	'&yen;' => 0x000A5,
	'&yicy;' => 0x00457,
	'&YIcy;' => 0x00407,
	'&yucy;' => 0x0044E,
	'&YUcy;' => 0x0042E,
	'&yuml;' => 0x000FF,
	'&Yuml;' => 0x00178,
	'&zacute;' => 0x0017A,
	'&Zacute;' => 0x00179,
	'&zcaron;' => 0x0017E,
	'&Zcaron;' => 0x0017D,
	'&zcy;' => 0x00437,
	'&Zcy;' => 0x00417,
	'&zdot;' => 0x0017C,
	'&Zdot;' => 0x0017B,
	'&zeetrf;' => 0x02128,
	'&ZeroWidthSpace;' => 0x0200B,
	'&zeta;' => 0x003B6,
	'&Zfr;' => 0x02128,
	'&zhcy;' => 0x00436,
	'&ZHcy;' => 0x00416,
	'&zigrarr;' => 0x021DD,
	'&Zopf;' => 0x02124);
}
