What is this patch? As an european user I needed iso8859-2 font encoding of truetype fonts, so I made a patch for MagicPoint which adds --with-ttencoding option to configure scripts and supports following encodings: iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_10, koi8_r, windows_1251, windows_1250, windows_1252, windows_1253, windows_1254, windows_1255, windows_1256, cp_437, cp_737, cp_850, cp_851, cp_852, cp_853, cp_855, cp_857, cp_860, cp_861, cp_862, cp_863, cp_864, cp_865, cp_866, cp_869, cp_895, wingreek, symbol, wingding, atari_st, windows_1257 Why so many? Well, I reused encoding tables from xfstt, so I added all encoding as a side effect. This is second version (update to one from 1st of February). Fix is one line in draw.c to prevent word wrapping on TrueType fonts with encodings. diff -uwrN magicpoint-1.04a/Imakefile.in magicpoint/Imakefile.in --- magicpoint-1.04a/Imakefile.in Fri Sep 4 11:00:40 1998 +++ magicpoint/Imakefile.in Mon Feb 1 22:51:09 1999 @@ -5,11 +5,11 @@ VPATH= @srcdir@ SRCS= mgp.c draw.c parse.c plist.c print.c globals.c x11.c x11dummy.c \ font.c background.c scanner.c grammar.c postscript.c tfont.c \ - embed.c + embed.c encoding.c TPOBJS= mgp.o draw.o parse.o plist.o globals.o x11.o font.o background.o \ - scanner.o grammar.o postscript.o tfont.o embed.o + scanner.o grammar.o postscript.o tfont.o embed.o encoding.o PROBJS= print.o parse.o globals.o x11dummy.o scanner.o grammar.o postscript.o \ - embed.o + embed.o encoding.o LIBOBJS= @LIBOBJS@ OBJS= ${TPOBJ} ${PROBJS} ${LIBOBJS} LIBS= $(srcdir)/image/libimage.a @@ -20,6 +20,7 @@ OPTFLAGS= @OPTFLAGS@ DEFS= @DEFS@ -DMGPLIBDIR=\"$(LIBDIR)/mgp\" +DEFS+= @mgp_cv_ttfencoding@ #DEFS+= -DGLYPHEDGE SYS_LIBRARIES= -L$(srcdir)/image -limage @LIBS@ @@ -67,6 +68,7 @@ SpecialObjectRule(scanner.o,scanner.c, $(DEFS) $(OPTFLAGS)) SpecialObjectRule(grammar.o,grammar.c, $(DEFS) $(OPTFLAGS)) SpecialObjectRule(embed.o,embed.c, $(DEFS) $(OPTFLAGS)) +SpecialObjectRule(encoding.o,encoding.c, $(DEFS) $(OPTFLAGS)) #define PassCDebugFlags #define IHaveSubdirs diff -uwrN magicpoint-1.04a/README.encoding magicpoint/README.encoding --- magicpoint-1.04a/README.encoding Thu Jan 1 01:00:00 1970 +++ magicpoint/README.encoding Mon Feb 1 22:51:09 1999 @@ -0,0 +1,20 @@ +Following encodings are supported for truetype fonts: + +iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, +iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_10, +koi8_r, windows_1251, windows_1250, windows_1252, windows_1253, windows_1254, +windows_1255, windows_1256, cp_437, cp_737, cp_850, cp_851, cp_852, cp_853, +p_855, cp_857, cp_860, cp_861, cp_862, cp_863, cp_864, cp_865, cp_866, +cp_869, cp_895, wingreek, symbol, wingding, atari_st, windows_1257 + +they are used if you specify --with-ttfencoding=[encoding] parametar +when running configure. Please note that X fonts are still used with +iso8859-1 encoding. + +encoding.c is based on file encoding.cpp from xfstt which is +(C) Copyright 1998 Herbert Duerr +with modifications for MagicPoint by Dobrica Pavlinusic + +ToDo: + encoding.c: make a file real C (drop C++ stuff like //s) + make --with-encoding option which will shange X and ttf encodings diff -uwrN magicpoint-1.04a/configure magicpoint/configure --- magicpoint-1.04a/configure Sun Sep 6 04:10:20 1998 +++ magicpoint/configure Mon Feb 1 22:51:09 1999 @@ -20,6 +20,8 @@ ac_help="$ac_help --with-vfontcap=PATH use PATH as vfontcap" ac_help="$ac_help + --with-ttfencoding=CODE use encoding (see README.encoding)" +ac_help="$ac_help --with-x use the X Window System" # Initialize some variables set by options. @@ -530,7 +532,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:534: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:536: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -559,7 +561,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:563: checking for $ac_word" >&5 +echo "configure:565: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -588,7 +590,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:592: checking for $ac_word" >&5 +echo "configure:594: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -636,7 +638,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -646,11 +648,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -670,12 +672,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:674: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:679: checking whether we are using GNU C" >&5 +echo "configure:681: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -684,7 +686,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -699,7 +701,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:703: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:705: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -731,7 +733,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:735: checking for $ac_word" >&5 +echo "configure:737: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -764,7 +766,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:768: checking for $ac_word" >&5 +echo "configure:770: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -796,7 +798,7 @@ # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:800: checking for $ac_word" >&5 +echo "configure:802: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -829,7 +831,7 @@ *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:833: checking for yywrap in -l$ac_lib" >&5 +echo "configure:835: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -837,7 +839,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -875,7 +877,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:879: checking for $ac_word" >&5 +echo "configure:881: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_mgp_cv_path_perl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -913,7 +915,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:917: checking for $ac_word" >&5 +echo "configure:919: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_mgp_cv_path_uuencode'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -951,7 +953,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:955: checking for $ac_word" >&5 +echo "configure:957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_mgp_cv_path_gzip'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -986,7 +988,7 @@ echo $ac_n "checking if --enable-debug option specified""... $ac_c" 1>&6 -echo "configure:990: checking if --enable-debug option specified" >&5 +echo "configure:992: checking if --enable-debug option specified" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -1002,7 +1004,7 @@ LIBS="-lm $LIBS" echo $ac_n "checking if --disable-freetype option specified""... $ac_c" 1>&6 -echo "configure:1006: checking if --disable-freetype option specified" >&5 +echo "configure:1008: checking if --disable-freetype option specified" >&5 # Check whether --enable-freetype or --disable-freetype was given. if test "${enable_freetype+set}" = set; then enableval="$enable_freetype" @@ -1019,8 +1021,8 @@ if test "$mgp_use_freetype" = "yes"; then echo $ac_n "checking for freetype library/header""... $ac_c" 1>&6 -echo "configure:1023: checking for freetype library/header" >&5 - for dir in /usr/local/freetype /usr/local; do +echo "configure:1025: checking for freetype library/header" >&5 + for dir in /usr/local/freetype /usr/local /usr; do ac_cv_ft_lib=no ac_cv_ft_include=no if test -d $dir/lib -a -f $dir/lib/libttf.so; then @@ -1051,7 +1053,7 @@ OPTFLAGS="-I$ac_cv_ft_include $OPTFLAGS" DEPLIBS="$ac_cv_ft_lib/$ac_cv_ft_libpath $DEPLIBS" echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:1055: checking for TT_Init_FreeType in -lttf" >&5 +echo "configure:1057: checking for TT_Init_FreeType in -lttf" >&5 ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1059,7 +1061,7 @@ ac_save_LIBS="$LIBS" LIBS="-lttf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1100,14 +1102,14 @@ fi cat > conftest.$ac_ext < int main() { ; return 0; } EOF -if { (eval echo configure:1111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -1122,16 +1124,16 @@ EOF echo $ac_n "checking for num_CharMaps field in TT_Face_Properties""... $ac_c" 1>&6 -echo "configure:1126: checking for num_CharMaps field in TT_Face_Properties" >&5 +echo "configure:1128: checking for num_CharMaps field in TT_Face_Properties" >&5 cat > conftest.$ac_ext < int main() { TT_Face_Properties x; return x.num_CharMaps; ; return 0; } EOF -if { (eval echo configure:1135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result=yes; cat >> confdefs.h <<\EOF #define HAVE_TT_FACE_PROPERTIES_CHARMAPS 1 @@ -1148,7 +1150,7 @@ fi echo $ac_n "checking if --disable-vflib option specified""... $ac_c" 1>&6 -echo "configure:1152: checking if --disable-vflib option specified" >&5 +echo "configure:1154: checking if --disable-vflib option specified" >&5 # Check whether --enable-vflib or --disable-vflib was given. if test "${enable_vflib+set}" = set; then enableval="$enable_vflib" @@ -1161,7 +1163,7 @@ if test "$mgp_use_vflib" = "yes"; then echo $ac_n "checking for VFlib library/header""... $ac_c" 1>&6 -echo "configure:1165: checking for VFlib library/header" >&5 +echo "configure:1167: checking for VFlib library/header" >&5 for dir in /usr/local/VFlib /usr/local/vflib /usr/local; do ac_cv_vf_libname=VFlib ac_cv_vf_libdir=no @@ -1202,7 +1204,7 @@ OPTFLAGS="-I$ac_cv_vf_hdrdir $OPTFLAGS" DEPLIBS="$ac_cv_vf_libdir/$ac_cv_vf_libpath $DEPLIBS" echo $ac_n "checking for VF_Init in -l$ac_cv_vf_libname""... $ac_c" 1>&6 -echo "configure:1206: checking for VF_Init in -l$ac_cv_vf_libname" >&5 +echo "configure:1208: checking for VF_Init in -l$ac_cv_vf_libname" >&5 ac_lib_var=`echo $ac_cv_vf_libname'_'VF_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1210,7 +1212,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$ac_cv_vf_libname $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1244,14 +1246,14 @@ fi cat > conftest.$ac_ext < int main() { ; return 0; } EOF -if { (eval echo configure:1255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -1267,7 +1269,7 @@ echo $ac_n "checking for VFlib configuration file""... $ac_c" 1>&6 -echo "configure:1271: checking for VFlib configuration file" >&5 +echo "configure:1273: checking for VFlib configuration file" >&5 # Check whether --with-vfontcap or --without-vfontcap was given. if test "${with_vfontcap+set}" = set; then withval="$with_vfontcap" @@ -1302,8 +1304,24 @@ fi +echo $ac_n "checking for ttf font encoding""... $ac_c" 1>&6 +echo "configure:1309: checking for ttf font encoding" >&5 +# Check whether --with-ttfencoding or --without-ttfencoding was given. +if test "${with_ttfencoding+set}" = set; then + withval="$with_ttfencoding" + : +fi + +ac_cv_ttfencoding="iso8859_1" +if test ! -z "$with_ttfencoding"; then + ac_cv_ttfencoding=$with_ttfencoding +fi +mgp_cv_ttfencoding="-Dmap_encoding2unicode=${ac_cv_ttfencoding}__map2unicode" +echo "$ac_t""$ac_cv_ttfencoding" 1>&6 + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1307: checking how to run the C preprocessor" >&5 +echo "configure:1325: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1318,13 +1336,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1335,13 +1353,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1368,7 +1386,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1372: checking for X" >&5 +echo "configure:1390: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1430,12 +1448,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1504,14 +1522,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1598,12 +1616,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1602: checking for ANSI C header files" >&5 +echo "configure:1620: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1611,7 +1629,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1628,7 +1646,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1646,7 +1664,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1667,7 +1685,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1678,7 +1696,7 @@ exit (0); } EOF -if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1702,12 +1720,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1706: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1724: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1723,7 +1741,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1747,17 +1765,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1751: checking for $ac_hdr" >&5 +echo "configure:1769: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1785,12 +1803,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1789: checking for working const" >&5 +echo "configure:1807: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1860,21 +1878,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1864: checking for inline" >&5 +echo "configure:1882: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1900,12 +1918,12 @@ esac echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1904: checking for pid_t" >&5 +echo "configure:1922: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1933,12 +1951,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1937: checking for size_t" >&5 +echo "configure:1955: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1966,12 +1984,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1970: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1988: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1980,7 +1998,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2001,12 +2019,12 @@ fi echo $ac_n "checking for u_int""... $ac_c" 1>&6 -echo "configure:2005: checking for u_int" >&5 +echo "configure:2023: checking for u_int" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2034,12 +2052,12 @@ fi echo $ac_n "checking for u_char""... $ac_c" 1>&6 -echo "configure:2038: checking for u_char" >&5 +echo "configure:2056: checking for u_char" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2068,7 +2086,7 @@ echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2072: checking for 8-bit clean memcmp" >&5 +echo "configure:2090: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2076,7 +2094,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2104,12 +2122,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2108: checking return type of signal handlers" >&5 +echo "configure:2126: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2126,7 +2144,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2147,12 +2165,12 @@ for ac_func in poll strstr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2151: checking for $ac_func" >&5 +echo "configure:2169: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2202,12 +2220,12 @@ for ac_func in usleep strsep strdup mkstemp snprintf memcmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2206: checking for $ac_func" >&5 +echo "configure:2224: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2419,6 +2437,7 @@ s%@OPTFLAGS@%$OPTFLAGS%g s%@DEPLIBS@%$DEPLIBS%g s%@mgp_cv_vflib_a@%$mgp_cv_vflib_a%g +s%@mgp_cv_ttfencoding@%$mgp_cv_ttfencoding%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@mgp_keywords@%$mgp_keywords%g diff -uwrN magicpoint-1.04a/configure.in magicpoint/configure.in --- magicpoint-1.04a/configure.in Sun Sep 6 04:10:21 1998 +++ magicpoint/configure.in Mon Feb 1 22:51:09 1999 @@ -45,7 +45,7 @@ AC_SUBST(DEPLIBS) if test "$mgp_use_freetype" = "yes"; then AC_MSG_CHECKING(for freetype library/header) - for dir in /usr/local/freetype /usr/local; do + for dir in /usr/local/freetype /usr/local /usr; do ac_cv_ft_lib=no ac_cv_ft_include=no if test -d $dir/lib -a -f $dir/lib/libttf.so; then @@ -173,6 +173,17 @@ AC_DEFINE_UNQUOTED(VFCAP, "$ac_cv_vf_fontcap") AC_SUBST(mgp_cv_vflib_a) fi + +dnl Specify ttf encodinf +AC_MSG_CHECKING(for ttf font encoding) +AC_ARG_WITH(ttfencoding, [ --with-ttfencoding=CODE use encoding (see README.encoding)]) +ac_cv_ttfencoding="iso8859_1" +if test ! -z "$with_ttfencoding"; then + ac_cv_ttfencoding=$with_ttfencoding +fi +mgp_cv_ttfencoding="-Dmap_encoding2unicode=${ac_cv_ttfencoding}__map2unicode" +AC_MSG_RESULT($ac_cv_ttfencoding) +AC_SUBST(mgp_cv_ttfencoding) dnl Checks for header files. AC_PATH_X diff -uwrN magicpoint-1.04a/draw.c magicpoint/draw.c --- magicpoint-1.04a/draw.c Fri Sep 4 17:06:52 1998 +++ magicpoint/draw.c Mon Feb 1 22:51:42 1999 @@ -891,7 +891,7 @@ } } else { q = p; - while (*q && isprint(*q) && !isspace(*q)) + while (*q && !isspace(*q)) q++; if (q == p) q++; diff -uwrN magicpoint-1.04a/encoding.c magicpoint/encoding.c --- magicpoint-1.04a/encoding.c Thu Jan 1 01:00:00 1970 +++ magicpoint/encoding.c Mon Feb 1 22:51:09 1999 @@ -0,0 +1,1028 @@ +/* remap from unicode to other encodings + Based on file encoding.cpp from xfstt (C) Copyright 1998 Herbert Duerr + Modifications for MagicPoint by Dobrica Pavlinusic + + ToDo: make a file real C (drop C++ stuff like //s) +*/ + +//--- +int iso8859_1__map2unicode( int code) +{ + if( code == 0x80) code = 0x20AC; // euro currency symbol + return code; +} + + +//--- +int iso8859_2__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0a0, 0x104, 0x2d8, 0x141, 0x0a4, 0x13d, 0x15a, 0xa7, + 0x0a8, 0x160, 0x15e, 0x164, 0x179, 0x0ad, 0x17d, 0x17b, + 0x0b0, 0x105, 0x2db, 0x142, 0x0b4, 0x13e, 0x15b, 0x2c7, + 0x0b8, 0x161, 0x15f, 0x165, 0x17a, 0x2dd, 0x17e, 0x17c, + 0x154, 0x0c1, 0x0c2, 0x102, 0x0c4, 0x139, 0x106, 0x0c7, + 0x10c, 0x0c9, 0x118, 0x0cb, 0x11a, 0x0cd, 0x0ce, 0x10e, + 0x110, 0x143, 0x147, 0x0d3, 0x0d4, 0x150, 0x0d6, 0x0d7, + 0x158, 0x16e, 0x0da, 0x170, 0x0dc, 0x0dd, 0x162, 0x0df, + 0x155, 0x0e1, 0x0e2, 0x103, 0x0e4, 0x13a, 0x107, 0x0e7, + 0x10d, 0x0e9, 0x119, 0x0eb, 0x11b, 0x0ed, 0x0ee, 0x10f, + 0x111, 0x144, 0x148, 0x0f3, 0x0f4, 0x151, 0x0f6, 0x0f7, + 0x159, 0x16f, 0x0fa, 0x171, 0x0fc, 0x0fd, 0x163, 0x2d9 + }; + + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa0 || code >= 256) return code; + return table[ code - 0xa0]; +} + +//--- +int iso8859_3__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0a0, 0x126, 0x2d8, 0x0a3, 0x0a4, 0x0a5, 0x124, 0x0a7, + 0x0a8, 0x130, 0x15e, 0x11e, 0x134, 0x0ad, 0x0ae, 0x17b, + 0x0b0, 0x127, 0x0b2, 0x0b3, 0x0b4, 0x0b5, 0x125, 0x0b7, + 0x0b8, 0x131, 0x15f, 0x11f, 0x135, 0x0bd, 0x0be, 0x17c, + 0x0c0, 0x0c1, 0x0c2, 0x0c3, 0x0c4, 0x10a, 0x108, 0x0c7, + 0x0c8, 0x0c9, 0x0ca, 0x0cb, 0x0cc, 0x0cd, 0x0ce, 0x0cf, + 0x0d0, 0x0d1, 0x0d2, 0x0d3, 0x0d4, 0x120, 0x0d6, 0x0d7, + 0x11c, 0x0d9, 0x0da, 0x0db, 0x0dc, 0x16c, 0x15c, 0x0df, + 0x0e0, 0x0e1, 0x0e2, 0x0e3, 0x0e4, 0x10b, 0x109, 0x0e7, + 0x0e8, 0x0e9, 0x0ea, 0x0eb, 0x0ec, 0x0ed, 0x0ee, 0x0ef, + 0x0f0, 0x0f1, 0x0f2, 0x0f3, 0x0f4, 0x121, 0x0f6, 0x0f7, + 0x11d, 0x0f9, 0x0fa, 0x0fb, 0x0fc, 0x16d, 0x15d, 0x2d9 + }; + + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa0 || code >= 256) return code; + return table[ code - 0xa0]; +} + +//--- +int iso8859_4__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0a0, 0x104, 0x138, 0x156, 0x0a4, 0x128, 0x13b, 0x0a7, + 0x0a8, 0x160, 0x112, 0x122, 0x166, 0x0ad, 0x17d, 0x0af, + 0x0b0, 0x105, 0x2db, 0x157, 0x0b4, 0x129, 0x13c, 0x2c7, + 0x0b8, 0x161, 0x113, 0x123, 0x167, 0x14a, 0x17e, 0x14b, + 0x100, 0x0c1, 0x0c2, 0x0c3, 0x0c4, 0x0c5, 0x0c6, 0x12e, + 0x10c, 0x0c9, 0x118, 0x0cb, 0x116, 0x0cd, 0x0ce, 0x12a, + 0x110, 0x145, 0x14c, 0x136, 0x0d4, 0x0d5, 0x0d6, 0x0d7, + 0x0d8, 0x172, 0x0da, 0x0db, 0x0dc, 0x168, 0x16a, 0x0df, + 0x101, 0x0e1, 0x0e2, 0x0e3, 0x0e4, 0x0e5, 0x0e6, 0x12f, + 0x10d, 0x0e9, 0x119, 0x0eb, 0x117, 0x0ed, 0x0ee, 0x12b, + 0x111, 0x146, 0x14d, 0x137, 0x0f4, 0x0f5, 0x0f6, 0x0f7, + 0x0f8, 0x173, 0x0fa, 0x0fb, 0x0fc, 0x169, 0x16b, 0x2d9 + }; + + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa0 || code >= 256) return code; + return table[ code - 0xa0]; +} + +//--- +int iso8859_5__map2unicode( int code) +{ + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa0 || code == 0xad || code >= 256) return code; + if( code == 0xf0) return 0x2116; + if( code == 0xfd) return 0xa7; + return (code + 0x360); +} + +//--- +int iso8859_6__map2unicode( int code) +{ + if( code < 0x30 || code >= 256) return code; + if( code <= 0x39) return (code + 0x630); + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa4) return code; + return (code + 0x560); +} + +//--- +int iso8859_7__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0a0, 0x2bd, 0x2bc, 0x0a3, 0x0a4, 0x0a5, 0x0a6, 0x0a7, + 0x0a8, 0x0a9, 0x0aa, 0x0ab, 0x0ac, 0x0ad, 0x0ae, 0x2015, + 0x0b0, 0x0b1, 0x0b2, 0x0b3, 0x384, 0x385, 0x386, 0x0b7, + 0x388, 0x389, 0x38a, 0x0bb, 0x38c, 0x0bd + }; + + if( code == 0x80) return 0x20AC; // euro currency symbol + if( code <= 0xa0 || code >= 256) return code; + if( code >= 0xbe) return (code + 0x2d0); + return table[ code - 0xa0]; +} + +//--- +int iso8859_8__map2unicode( int code) +{ + if( code <= 0xa9 || code >= 256) return code; + if( code == 0xaa) return 0xd7; + if( code == 0xaf) return 0x203e; + if( code == 0xdf) return 0x2017; + return (code + 0x4f0); // thanks Stanislav Malyshev +} + +//--- +int iso8859_9__map2unicode( int code) +{ + if( code < 0xd0 || code >= 255) return code; + switch( code) { + case 0x80: return 0x20AC; + case 0xd0: return 0x11e; + case 0xdd: return 0x130; + case 0xde: return 0x15e; + case 0xf0: return 0x11f; + case 0xfd: return 0x131; + case 0xfe: return 0x15f; + } + return code; +} + + +//--- thanks Vladimir Eltsov and Nikolay Grygoryev +int koi8_r__map2unicode( int code) +{ + static unsigned short table[] = { + 0x2500,0x2502,0x250c,0x2510,0x2514,0x2518,0x251c,0x2524, + 0x252c,0x2534,0x253c,0x2580,0x2584,0x2588,0x258c,0x2590, + 0x2591,0x2592,0x2593,0x2320,0x25a0,0x2219,0x221a,0x2248, + 0x2264,0x2265,0x00a0,0x2321,0x00b0,0x00b2,0x00b7,0x00f7, + 0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556, + 0x2557,0x2558,0x2559,0x255a,0x255b,0x255c,0x255d,0x255e, + 0x255f,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565, + 0x2566,0x2567,0x2568,0x2569,0x256a,0x256b,0x256c,0x00a9, + 0x044e,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433, + 0x0445,0x0438,0x0439,0x043a,0x043b,0x043c,0x043d,0x043e, + 0x043f,0x044f,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432, + 0x044c,0x044b,0x0437,0x0448,0x044d,0x0449,0x0447,0x044a, + 0x042e,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413, + 0x0425,0x0418,0x0419,0x041a,0x041b,0x041c,0x041d,0x041e, + 0x041f,0x042f,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412, + 0x042c,0x042b,0x0417,0x0428,0x042d,0x0429,0x0427,0x042a + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1251__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, + 0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, + 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, + 0,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, + 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, + 0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407, + 0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7, + 0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457, + 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, + 0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, + 0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, + 0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, + 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, + 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, + 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, + 0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + +//--- thanks Petr Tomasek +int iso8859_10__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, + 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, + 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x0104,0x0112,0x0122,0x012A,0x0128,0x0136,0x013B, + 0x0143,0x0156,0x0160,0x0166,0x017D,0x00AD,0x0138,0x014A, + 0x0111,0x0105,0x0113,0x0123,0x012B,0x0129,0x0137,0x013C, + 0x0144,0x0157,0x0161,0x0167,0x017E,0x00A7,0x00DF,0x014B, + 0x0100,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x012E, + 0x010C,0x00C9,0x0118,0x00CB,0x0116,0x00CD,0x00CE,0x00CF, + 0x0110,0x0145,0x014C,0x00D3,0x00D4,0x00D5,0x00D6,0x0168, + 0x00D8,0x0172,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x016A, + 0x0101,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x012F, + 0x010D,0x00E9,0x0119,0x00EB,0x0117,0x00ED,0x00EE,0x00EF, + 0x00F0,0x0146,0x014D,0x00F3,0x00F4,0x00F5,0x00F6,0x0169, + 0x00F8,0x0173,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x016B + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1250__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0,0x201A,0,0x201E,0x22EF,0x2020,0x2021, + 0,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A, + 0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7, + 0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B, + 0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7, + 0x00B8,0x0105,0x015F,0x00BB,0x0178,0x02DD,0x013D,0x017C, + 0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7, + 0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E, + 0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7, + 0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF, + 0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7, + 0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F, + 0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, + 0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1252__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0,0x201A,0x0192,0x201E,0x22EF,0x2020,0x2021, + 0x0302,0x2030,0x0160,0x2039,0x0152,0,0,0, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0x0303,0x2122,0x0161,0x203A,0x0153,0,0,0x0178, + 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, + 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, + 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, + 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, + 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, + 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, + 0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, + 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF, + 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, + 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, + 0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, + 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1253__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0,0x201A,0x0192,0x201E,0x22EF,0x2020,0x2021, + 0,0x2030,0,0x2039,0,0,0,0, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0,0x2122,0,0x203A,0,0,0,0, + 0x00A0,0x0385,0x0386,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, + 0x00A8,0x00A9,0,0x00AB,0x00AC,0x00AD,0x00AE,0x2015, + 0x00B0,0x00B1,0x00B2,0x00B3,0x0384,0x00B5,0x00B6,0x0387, + 0x0388,0x0389,0x038A,0x00BB,0x038C,0x00BD,0x038E,0x038F, + 0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397, + 0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, + 0x03A0,0x03A1,0,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7, + 0x03A8,0x03A9,0x03AA,0x03AB,0x03AC,0x03AD,0x03AE,0x03AF, + 0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7, + 0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF, + 0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7, + 0x03C8,0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1254__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0,0x201A,0x0192,0x201E,0x22EF,0x2020,0x2021, + 0x0302,0x2030,0x0160,0x2039,0x0152,0,0,0, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0x0303,0x2122,0x0161,0x203A,0x0153,0,0,0x0178, + 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, + 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, + 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, + 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF, + 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7, + 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF, + 0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7, + 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF, + 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7, + 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF, + 0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, + 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1255__map2unicode( int code) +{ + static unsigned short table[] = { + 0x20AC,0,0x201A,0x0192,0x201E,0x22EF,0x2020,0x2021, + 0,0x2030,0,0x2039,0,0,0,0, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0,0x2122,0,0x203A,0,0,0,0, + 0x00A0,0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, + 0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x030D, + 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, + 0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0x2017, + 0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7, + 0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF, + 0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7, + 0x05E8,0x05E9,0x05EA,0,0,0,0,0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int windows_1256__map2unicode( int code) +{ + static unsigned short table[] = { + 0x060C,0,0x201A,0,0x201E,0x22EF,0x2020,0x2021, + 0,0x2030,0,0x2039,0,0,0,0, + 0,0x2018,0x2019,0x201C,0x201D,0x2219,0x2013,0x2014, + 0x061B,0x2122,0x061F,0x203A,0x0621,0x0622,0x0623,0x0178, + 0x00A0,0x0624,0x0625,0x00A3,0x00A4,0x0626,0x00A6,0x00A7, + 0x0627,0x00A9,0x0628,0x00AB,0x00AC,0x00AD,0x00AE,0, + 0x00B0,0x00B1,0x0629,0x062A,0x062B,0x00B5,0x00B6,0x00B7, + 0x062C,0,0x062D,0x00BB,0x062E,0x062F,0x0630,0x0631, + 0x00C0,0x0632,0x00C2,0,0x0633,0x0634,0x0635,0x00C7, + 0x00C8,0x00C9,0x00CA,0x00CB,0x0636,0x0637,0x00CE,0x00CF, + 0x0638,0x0639,0x063A,0x0640,0x00D4,0x0641,0x0642,0x00D7, + 0x0643,0x00D9,0x06AF,0x00DB,0x00DC,0x0644,0x0645,0x0646, + 0x00E0,0x0647,0x00E2,0,0x0648,0x0649,0x064A,0x00E7, + 0x00E8,0x00E9,0x00EA,0x00EB,0x064B,0x064C,0x00EE,0x00EF, + 0x064D,0x064E,0x064F,0x0650,0x00F4,0x0651,0x0652,0x00F7, + 0,0x00F9,0,0x00FB,0x00FC,0,0,0x00FF + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_437__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, + 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, + 0x00FF,0x00D6,0x00DC,0x00A2,0x00A3,0x00A5,0x20A7,0x0192, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, + 0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_737__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398, + 0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0, + 0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, + 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8, + 0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C2,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03C9,0x03AC,0x03AD,0x03AE,0x03CA,0x03AF,0x03CC,0x03CD, + 0x03CB,0x03CE,0x0386,0x0388,0x0389,0x038A,0x038C,0x038E, + 0x038F,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x00A3,0x0387,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_850__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, + 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, + 0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x00D7,0x0192, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, + 0x00BF,0x00AE,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0, + 0x00A9,0x2563,0x2551,0x2557,0x255D,0x00A2,0x00A5,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x00E3,0x00C3, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, + 0x00F0,0x00D0,0x00CA,0x00CB,0x00C8,0x0131,0x00CD,0x00CE, + 0x00CF,0x2518,0x250C,0x2588,0x2584,0x00A6,0x00CC,0x2580, + 0x00D3,0x00DF,0x00D4,0x00D2,0x00F5,0x00D5,0x00B5,0x00FE, + 0x00DE,0x00DA,0x00DB,0x00D9,0x00FD,0x00DD,0x00AF,0x00B4, + 0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8, + 0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_851__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x0386,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x0388,0x00C4,0x0389, + 0x038A,0,0x038C,0x00F4,0x00F6,0x038E,0x00FB,0x00F9, + 0x038F,0x00D6,0x00DC,0x03AC,0x00A3,0x03AD,0x03AE,0x03AF, + 0x03CA,0x0390,0x03CC,0x03CD,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x00BD,0x0398,0x0399,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x039A,0x039B,0x039C, + 0x039D,0x2563,0x2551,0x2557,0x255D,0x039E,0x039F,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x03A0,0x03A1, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x03A3, + 0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2, + 0x03B3,0x2518,0x250C,0x2588,0x2584,0x03B4,0x03B5,0x2580, + 0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD, + 0x03BE,0x03BF,0x03C0,0x03C1,0x03C3,0x03C2,0x03C4,0x0384, + 0x00AD,0x00B1,0x03C5,0x03C6,0x03C7,0x00A7,0x03C8,0x0385, + 0x00B0,0x00A8,0x03C9,0x03CB,0x03B0,0x03CE,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_852__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7, + 0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106, + 0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A, + 0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D, + 0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E, + 0x0118,0x0119,0,0x017A,0x010C,0x015F,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A, + 0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, + 0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE, + 0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580, + 0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161, + 0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4, + 0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8, + 0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_853__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x0109,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x0108, + 0x00C9,0x010B,0x010A,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, + 0x0130,0x00D6,0x00DC,0x011D,0x00A3,0x011C,0x00D7,0x0135, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x011E,0x011F, + 0x0124,0x0125,0,0x00BD,0x0134,0x015F,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0, + 0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x015C,0x015D, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, + 0,0,0x00CA,0x00CB,0x00C8,0x0131,0x00CD,0x00CE, + 0x00CF,0x2518,0x250C,0x2588,0x2584,0,0x00CC,0x2580, + 0x00D3,0x00DF,0x00D4,0x00D2,0x0120,0x0121,0x00B5,0x0126, + 0x0127,0x00DA,0x00DB,0x00D9,0x016C,0x016D,0,0x00B4, + 0x00AD,0,0x2113,0x0149,0x02D8,0x00A7,0x00F7,0x00B8, + 0x00B0,0x00A8,0x02D9,0,0x00B3,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_855__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0452,0x0402,0x0453,0x0403,0x0451,0x0401,0x0454,0x0404, + 0x0455,0x0405,0x0456,0x0406,0x0457,0x0407,0x0458,0x0408, + 0x0459,0x0409,0x045A,0x040A,0x045B,0x040B,0x045C,0x040C, + 0x045E,0x040E,0x045F,0x040F,0x044E,0x042E,0x044A,0x042A, + 0x0430,0x0410,0x0431,0x0411,0x0446,0x0426,0x0434,0x0414, + 0x0435,0x0415,0x0444,0x0424,0x0433,0x0413,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x0445,0x0425,0x0438, + 0x0418,0x2563,0x2551,0x2557,0x255D,0x0439,0x0419,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x043A,0x041A, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, + 0x043B,0x041B,0x043C,0x041C,0x043D,0x041D,0x043E,0x041E, + 0x043F,0x2518,0x250C,0x2588,0x2584,0x041F,0x044F,0x2580, + 0x042F,0x0440,0x0420,0x0441,0x0421,0x0442,0x0422,0x0443, + 0x0423,0x0436,0x0416,0x0432,0x0412,0x044C,0x042C,0x2116, + 0x00AD,0x044B,0x042B,0x0437,0x0417,0x0448,0x0428,0x044D, + 0x042D,0x0449,0x0429,0x0447,0x0427,0,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_857__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x0131,0x00C4,0x00C5, + 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, + 0x0130,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x015E,0x015F, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x011E,0x011F, + 0x00BF,0x00AE,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0, + 0x00A9,0x2563,0x2551,0x2557,0x255D,0x00A2,0x00A5,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x00E3,0x00C3, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4, + 0x00BA,0x00AA,0x00CA,0x00CB,0x00C8,0,0x00CD,0x00CE, + 0x00CF,0x2518,0x250C,0x2588,0x2584,0x00A6,0x00CC,0x2580, + 0x00D3,0x00DF,0x00D4,0x00D2,0x00F5,0x00D5,0x00B5,0x00FE, + 0x00D7,0x00DA,0x00DB,0x00D9,0x00EC,0x00FF,0x00AF,0x00B4, + 0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8, + 0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_860__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E3,0x00E0,0x00C1,0x00E7, + 0x00EA,0x00CA,0x00E8,0x00CD,0x00D4,0x00EC,0x00C3,0x00C2, + 0x00C9,0x00C0,0x00C8,0x00F4,0x00F5,0x00F2,0x00DA,0x00F9, + 0x00CC,0x00D5,0x00DC,0x00A2,0x00A3,0x00D9,0x20A7,0x00D3, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, + 0x00BF,0x00D2,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_861__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00D0,0x00F0,0x00DE,0x00C4,0x00C5, + 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00FE,0x00FB,0x00F9, + 0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x20A7,0x0192, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00C1,0x00CD,0x00D3,0x00DA, + 0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_862__map2unicode( int code) +{ + static unsigned short table[] = { + 0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7, + 0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF, + 0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7, + 0x05E8,0x05E9,0x05EA,0x00A2,0x00A3,0x00A5,0x20A7,0x0192, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, + 0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_863__map2unicode( int code) +{ + static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00C2,0x00E0,0x00B6,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x2017,0x00C0,0x00A7, + 0x00C9,0x00C8,0x00CA,0x00F4,0x00CB,0x00CF,0x00FB,0x00F9, + 0x00A4,0x00D4,0x00DC,0x00A2,0x00A3,0x00D9,0x00DB,0x0192, + 0x00A6,0x00B4,0x00F3,0x00FA,0x00A8,0x00B8,0x00B3,0x00AF, + 0x00CE,0x2310,0x00AC,0x00BD,0x00BC,0x00BE,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_864__map2unicode( int code) +{ +static unsigned short table[] = { + 0x00B0,0x00B7,0x2219,0x221A,0x2592,0x2500,0x2502,0x253C, + 0x2524,0x252C,0x251C,0x2534,0x2510,0x250C,0x2514,0x2518, + 0x00DF,0x221E,0x03A6,0x00B1,0x00BD,0x00BC,0x2248,0x00AB, + 0x00BB,0,0,0,0,0,0,0, + 0x00A0,0x00AD,0,0x00A3,0x00A4,0,0,0, + 0,0x0628,0x062A,0x062B,0x060C,0x062C,0x062D,0x062E, + 0x0660,0x0661,0x0662,0x0663,0x0664,0x0665,0x0666,0x0667, + 0x0668,0x0669,0x0641,0x061B,0x0633,0x0634,0x0635,0x061F, + 0x00A2,0x0621,0x0622,0x0623,0x0624,0,0,0x0627, + 0,0x0629,0,0,0,0,0,0x062F, + 0x0630,0x0631,0x0632,0,0,0,0,0x0637, + 0x0638,0,0,0x00A6,0x00AC,0x00F7,0x00D7,0x0639, + 0x0640,0,0,0,0,0,0,0, + 0x0648,0x0649,0,0x0636,0,0,0x063A,0x0645, + 0,0x0651,0x0646,0x0647,0,0,0,0, + 0x0642,0,0,0x0644,0x0643,0x064A,0x25A0,0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_865__map2unicode( int code) +{ +static unsigned short table[] = { + 0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7, + 0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5, + 0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9, + 0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x20A7,0x0192, + 0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA, + 0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00A4, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_866__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417, + 0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F, + 0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427, + 0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F, + 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, + 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447, + 0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F, + 0x0401,0x0451,0x0404,0x0454,0x0407,0x0457,0x040E,0x045E, + 0x00B0,0x2219,0x00B7,0x221A,0x2116,0x00A4,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_869__map2unicode( int code) +{ + static unsigned short table[] = { + 0,0,0,0,0,0,0x0386,0, + 0x0387,0x00AC,0x00A6,0x2018,0x2019,0x0388,0x2015,0x0389, + 0x038A,0x03AA,0x038C,0,0,0x038E,0x03AB,0x00A9, + 0x038F,0x00B2,0x00B3,0x03AC,0x00A3,0x03AD,0x03AE,0x03AF, + 0x03CA,0x0390,0x03CC,0x03CD,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x00BD,0x0398,0x0399,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x039A,0x039B,0x039C, + 0x039D,0x2563,0x2551,0x2557,0x255D,0x039E,0x039F,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x03A0,0x03A1, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x03A3, + 0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2, + 0x03B3,0x2518,0x250C,0x2588,0x2584,0x03B4,0x03B5,0x2580, + 0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD, + 0x03BE,0x03BF,0x03C0,0x03C1,0x03C3,0x03C2,0x03C4,0x0384, + 0x00AD,0x00B1,0x03C5,0x03C6,0x03C7,0x00A7,0x03C8,0x0385, + 0x00B0,0x00A8,0x03C9,0x03CB,0x03B0,0x03CE,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int cp_895__map2unicode( int code) +{ + static unsigned short table[] = { + 0x010C,0x00FC,0x00E9,0x010F,0x00E4,0x010E,0x0164,0x010D, + 0x011B,0x011A,0x0139,0x00CD,0x013E,0x013A,0x00C4,0x00C1, + 0x00C9,0x017E,0x017D,0x00F4,0x00F6,0x00D3,0x016F,0x00DA, + 0x00FD,0x00D6,0x00DC,0x0160,0x013D,0x00DD,0x0158,0x0165, + 0x00E1,0x00ED,0x00F3,0x00FA,0x0148,0x0147,0x016E,0x00D4, + 0x0161,0x0159,0x0155,0x0154,0x00BC,0x00A1,0x00AB,0x00BB, + 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556, + 0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510, + 0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F, + 0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567, + 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B, + 0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580, + 0x03B1,0x00DF,0x0393,0x03C0,0x2211,0x03C3,0x00B5,0x03C4, + 0x03A6,0x0398,0x2126,0x03B4,0x221E,0x2205,0x2208,0x2229, + 0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248, + 0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + + +//--- +int wingreek__map2unicode( int code) +{ + static unsigned short table[] = { + 0,0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006, + 0x0007,0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E, + 0x000F,0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016, + 0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0,0x03E0,0x03DC,0x03DA,0x03DE,0, + 0x1FBF,0x0028,0x0029,0x002A,0,0x002C,0x002D,0x002E, + 0x1FFD,0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036, + 0x0037,0x0038,0x0039,0x0387,0x037E,0x003C,0x003D,0x003E, + 0x003F,0x00A8,0x0391,0x0392,0x03A7,0x0394,0x0395,0x03A6, + 0x0393,0x0397,0x0399,0x1FF3,0x039A,0x039B,0x039C,0x039D, + 0x039F,0x03A0,0x0398,0x03A1,0x03A3,0x03A4,0x03A5,0x1FC3, + 0x03A9,0x039E,0x03A8,0x0396,0x005B,0x1FEF,0x005D,0x1FC0, + 0x005F,0x1FFE,0x03B1,0x03B2,0x03C7,0x03B4,0x03B5,0x03C6, + 0x03B3,0x03B7,0x03B9,0x03C2,0x03BA,0x03BB,0x03BC,0x03BD, + 0x03BF,0x03C0,0x03B8,0x03C1,0x03C3,0x03C4,0x03C5,0x1FB3, + 0x03C9,0x03BE,0x03C8,0x03B6,0x007B,0x007C,0x007D,0x007E, + 0x007F,0,0,0,0x1F31,0x1F30,0x1F77,0x1F35, + 0x1F34,0x1F76,0x1F35,0x1F32,0x1FD6,0x1F37,0x1F36,0x03CA, + 0x1FD3,0x1FD2,0x1FDF,0x1FCF,0x1FDE,0x1FCE,0x1FDD,0x1FCD, + 0x1FEE,0x1F11,0x1F10,0x1F73,0x1F15,0x1F14,0x1F72,0x1F13, + 0x1F12,0x1F84,0x1F01,0x1F00,0x1F71,0x1F05,0x1F04,0x1F70, + 0x1F03,0x1F02,0x1FB6,0x1F07,0x1F06,0x1F81,0x1F80,0x1FB4, + 0x1F85,0x1F84,0x1FB2,0x1F83,0x1F83,0x1FB7,0x1F87,0x1F86, + 0x1FE5,0x1FE4,0x1F21,0x1F20,0x1F75,0x1F25,0x1F24,0x1F74, + 0x1F23,0x1F22,0x1FC6,0x1F27,0x1F26,0x037A,0x1F91,0x1F90, + 0x1FC4,0x1F95,0x1F94,0x1FC2,0x1F93,0x1F92,0x1FC7,0x1F97, + 0x1F96,0x1F41,0x1F40,0x1F79,0x1F45,0x1F44,0x1F78,0x1F43, + 0x1F42,0x1F51,0x1F50,0x1F7B,0x1F55,0x1F54,0x1F7A,0x1F53, + 0x1F52,0x1FE6,0x1F57,0x1F56,0x03CB,0x1FE3,0x1FE2,0x1F61, + 0x1F60,0x1F7D,0x1F65,0x1F64,0x1F7C,0x1F63,0x1F62,0x1FF6, + 0x1F67,0x1F66,0x1FA1,0x1FA0,0x1FF4,0x1FA5,0x1FA4,0x1FF2, + 0x1FA3,0x1FA2,0x1FF7,0x1FA7,0x1FA6,0,0,0 + }; + + if( code >= 256) return code; + return table[ code]; +} + + +//--- +int symbol__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, + 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, + 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, + 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, + 0x0020,0x0021,0x2200,0x0023,0x2203,0x0025,0x0026,0x220B, + 0x0028,0x0029,0x2217,0x002B,0x002C,0x2212,0x002E,0x002F, + 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, + 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F, + 0x2245,0x0391,0x0392,0x03A7,0x0394,0x0395,0x03A6,0x0393, + 0x0397,0x0399,0x03D1,0x039A,0x039B,0x039C,0x039D,0x039F, + 0x03A0,0x0398,0x03A1,0x03A3,0x03A4,0x03A5,0x03C2,0x03A9, + 0x039E,0x03A8,0x0396,0x005B,0x2234,0x005D,0x22A5,0x005F, + 0x203E,0x03B1,0x03B2,0x03C7,0x03B4,0x03B5,0x03C6,0x03B3, + 0x03B7,0x03B9,0x03D5,0x03BA,0x03BB,0x03BC,0x03BD,0x03BF, + 0x03C0,0x03B8,0x03C1,0x03C3,0x03C4,0x03C5,0x03D6,0x03C9, + 0x03BE,0x03C8,0x03B6,0x007B,0x007C,0x007D,0x223C,0x007F, + 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F, + 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, + 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0,0x03D2,0x2032,0x2264,0x2215,0x221E,0x0192,0x2663, + 0x2666,0x2665,0x2660,0x2194,0x2190,0x2191,0x2192,0x2193, + 0x00B0,0x00B1,0x2033,0x2265,0x00D7,0x221D,0x2202,0x2219, + 0x00F7,0x2260,0x2261,0x2248,0x22EF,0,0,0x21B5, + 0,0x2111,0x211C,0x2118,0x2297,0x2295,0x2205,0x2229, + 0x222A,0x2283,0x2287,0x2284,0x2282,0x2286,0x2208,0x2209, + 0x2220,0x2207,0x00AE,0x00A9,0x2122,0x220F,0x221A,0x22C5, + 0x00AC,0x2227,0x2228,0x21D4,0x21D0,0x21D1,0x21D2,0x21D3, + 0x25CA,0x2329,0,0,0,0x2211,0,0, + 0,0,0,0,0,0,0,0, + 0,0x232A,0x222B,0x2320,0,0x2321,0,0, + 0,0,0,0,0,0,0,0 + }; + + if( code >= 256) return code; + return table[ code]; +} + + +//--- +int wingding__map2unicode( int code) +{ + static unsigned short table[] = { + 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, + 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, + 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, + 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F, + 0x0020,0x270F,0x2702,0x2701,0,0,0,0, + 0x260E,0x2706,0x2709,0,0,0,0,0, + 0,0,0,0,0,0,0,0x2328, + 0,0,0,0,0,0,0x2707,0x270D, + 0,0x270C,0,0,0,0x261C,0x261E,0x261D, + 0x261F,0,0x263A,0,0x2639,0,0x2620,0, + 0,0x2708,0x263C,0,0x2744,0x271D,0x271E,0, + 0x2720,0x2721,0x262A,0x262F,0,0x2638,0x2648,0x2649, + 0x264A,0x264B,0x264C,0x264D,0x264E,0x264F,0x2650,0x2651, + 0x2652,0x2653,0,0,0x25CF,0,0x25A0,0, + 0,0x2751,0x2752,0,0,0x25C6,0x2756,0, + 0x2327,0,0x2318,0x2740,0x273F,0x275D,0x275E,0, + 0,0x2780,0x2781,0x2782,0x2783,0x2784,0x2785,0x2786, + 0x2787,0x2788,0x2789,0,0x278A,0x278B,0x278C,0x278D, + 0x278E,0x278F,0x2790,0x2791,0x2792,0x2793,0,0, + 0,0,0,0,0,0,0,0, + 0,0x25CB,0,0,0,0,0,0, + 0x25A1,0,0x2726,0x2605,0x2736,0x2738,0x2739,0x2735, + 0,0x2316,0x2727,0x2311,0x2370,0x272A,0x2730,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x232B,0x2326,0, + 0x27A2,0,0,0,0,0,0,0x2190, + 0x2192,0x2191,0x2193,0x2196,0x2197,0x2199,0x2198,0, + 0,0,0,0,0,0,0,0x21E6, + 0x21E8,0x21E7,0x21E9,0,0,0,0,0, + 0,0,0,0x2718,0x2714,0,0,0 + }; + + if( code >= 256) return code; + return table[ code]; +} + + +//--- +int atari_st__map2unicode( int code) +{ + static unsigned short table[] = { + 0,0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5, + 0x00E7,0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4, + 0x00C5,0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB, + 0x00F9,0x00FF,0x00D6,0x00DC,0x00A2,0x00A3,0x00A5,0x00DF, + 0x0192,0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA, + 0x00BA,0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB, + 0x00BB,0x00E3,0x00F5,0x00D8,0x00F8,0x0153,0x0152,0x00C0, + 0x00C3,0x00D5,0x00A8,0x00B4,0x2020,0x00B6,0x00A9,0x00AE, + 0x2122,0x0133,0x0132,0x05D0,0x05D1,0x05D2,0x05D3,0x05D4, + 0x05D5,0x05D6,0x05D7,0x05D8,0x05D9,0x05DB,0x05DC,0x05DE, + 0x05E0,0x05E1,0x05E2,0x05E4,0x05E6,0x05E7,0x05E8,0x05E9, + 0x05EA,0x05DF,0x05DA,0x05DD,0x05E3,0x05E5,0x00A7,0x2227, + 0x221E,0x03B1,0x03B2,0x0393,0x03C0,0x2211,0x03C3,0x00B5, + 0x03C4,0x03A6,0x0398,0x2126,0x03B4,0x222E,0x2205,0x2208, + 0x2229,0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7, + 0x2248,0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x00B3, + 0x00AF }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} + +//--- thanks Gilbert Baumann +int windows_1257__map2unicode( int code) +{ + static unsigned short table[] = { + 0,0,0x201a,0,0x201e,0x2026,0x2020,0x2021, + 0,0x2030,0,0x2039,0,0x00a8,0x02c7,0x00b8, + 0,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014, + 0,0x2122,0,0x203a,0,0x00af,0x02db,0, + 0x00a0,0xf8fc,0x00a2,0x00a3,0x00a4,0xf8fd,0x00a6,0x00a7, + 0x00d8,0x00a9,0x0156,0x00ab,0x00ac,0x00ad,0x00ae,0x00c6, + 0x00b0,0x00b1,0x00b2,0x00b3,0x00b4,0x00b5,0x00b6,0x00b7, + 0x00f8,0x00b9,0x0157,0x00bb,0x00bc,0x00bd,0x00be,0x00e6, + 0x0104,0x012e,0x0100,0x0106,0x00c4,0x00c5,0x0118,0x0112, + 0x010c,0x00c9,0x0179,0x0116,0x0122,0x0136,0x012a,0x013b, + 0x0160,0x0143,0x0145,0x00d3,0x014c,0x00d5,0x00d6,0x00d7, + 0x0172,0x0141,0x015a,0x016a,0x00dc,0x017b,0x017d,0x00df, + 0x0105,0x012f,0x0101,0x0107,0x00e4,0x00e5,0x0119,0x0113, + 0x010d,0x00e9,0x017a,0x0117,0x0123,0x0137,0x012b,0x013c, + 0x0161,0x0144,0x0146,0x00f3,0x014d,0x00f5,0x00f6,0x00f7, + 0x0173,0x0142,0x015b,0x016b,0x00fc,0x017c,0x017e,0x02d9 + }; + + if( code < 128 || code >= 256) return code; + return table[ code - 128]; +} diff -uwrN magicpoint-1.04a/tfont.c magicpoint/tfont.c --- magicpoint-1.04a/tfont.c Fri Sep 4 23:21:45 1998 +++ magicpoint/tfont.c Mon Feb 1 22:51:09 1999 @@ -481,6 +481,8 @@ unsigned short i, n; unsigned short platform, encoding; + code = map_encoding2unicode(code); + /* First, look for a Unicode charmap */ #ifdef HAVE_TT_FACE_PROPERTIES_CHARMAPS n = properties[tfcuridx].num_CharMaps;