diff options
Diffstat (limited to 'support/translit')
49 files changed, 14684 insertions, 0 deletions
diff --git a/support/translit/.Links b/support/translit/.Links new file mode 100644 index 0000000000..2ed8113999 --- /dev/null +++ b/support/translit/.Links @@ -0,0 +1,5 @@ +Type=1 +Name=1993 +Path=1/pub/chemistry/93 +Host=+ + diff --git a/support/translit/1251-alt.rus b/support/translit/1251-alt.rus new file mode 100644 index 0000000000..b74da6797c --- /dev/null +++ b/support/translit/1251-alt.rus @@ -0,0 +1,98 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 5, 1995 +# File 1251-alt.rus + + +# This is a transliteration data file for converting from +# MS Page 1251 (MS WINDOWS) to Alternativnyj Variant (ALT/AV) +# popular under MS-DOS +# To be used with translit.c program by Jan Labanowski + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xAB" 0 "\0xf3" # openning quote + 0 "\0xBB" 0 "\0xf4" # closing quote + 0 "\0xA8" 0 "\0xf0" # capital Yo + 0 "\0xB8" 0 "\0xf1" # small yo + 0 "\0xC0" 0 "\0x80" # capital A + 0 "\0xC1" 0 "\0x81" # capital Be + 0 "\0xC2" 0 "\0x82" # capital Ve + 0 "\0xC3" 0 "\0x83" # capital Ghe + 0 "\0xC4" 0 "\0x84" # capital De + 0 "\0xC5" 0 "\0x85" # capital Ie + 0 "\0xC6" 0 "\0x86" # capital Zhe + 0 "\0xC7" 0 "\0x87" # capital Ze + 0 "\0xC8" 0 "\0x88" # capital I + 0 "\0xC9" 0 "\0x89" # capital short I + 0 "\0xCa" 0 "\0x8a" # capital Ka + 0 "\0xCb" 0 "\0x8b" # capital El + 0 "\0xCc" 0 "\0x8c" # capital Em + 0 "\0xCd" 0 "\0x8d" # capital En + 0 "\0xCe" 0 "\0x8e" # capital O + 0 "\0xCf" 0 "\0x8f" # capital Pe + 0 "\0xD0" 0 "\0x90" # capital Er + 0 "\0xD1" 0 "\0x91" # capital Es + 0 "\0xD2" 0 "\0x92" # capital Te + 0 "\0xD3" 0 "\0x93" # capital U + 0 "\0xD4" 0 "\0x94" # capital Ef + 0 "\0xD5" 0 "\0x95" # capital Kha + 0 "\0xD6" 0 "\0x96" # capital Tse + 0 "\0xD7" 0 "\0x97" # capital Che + 0 "\0xD8" 0 "\0x98" # capital Sha + 0 "\0xD9" 0 "\0x99" # capital Shcha + 0 "\0xDa" 0 "\0x9a" # capital hard sign (Ier) + 0 "\0xDb" 0 "\0x9b" # capital Y (Iery) + 0 "\0xDc" 0 "\0x9c" # capital soft sign Ierik + 0 "\0xDd" 0 "\0x9d" # capital reverse round E + 0 "\0xDe" 0 "\0x9e" # capital Yu + 0 "\0xDf" 0 "\0x9f" # capital Ya + 0 "\0xE0" 0 "\0xa0" # small a + 0 "\0xE1" 0 "\0xa1" # small be + 0 "\0xE2" 0 "\0xa2" # small ve + 0 "\0xE3" 0 "\0xa3" # small ghe + 0 "\0xE4" 0 "\0xa4" # small de + 0 "\0xE5" 0 "\0xa5" # small ie + 0 "\0xE6" 0 "\0xa6" # small zhe + 0 "\0xE7" 0 "\0xa7" # small z + 0 "\0xE8" 0 "\0xa8" # small i + 0 "\0xE9" 0 "\0xa9" # small short i + 0 "\0xEa" 0 "\0xaa" # small ka + 0 "\0xEb" 0 "\0xab" # small el + 0 "\0xEc" 0 "\0xac" # small em + 0 "\0xEd" 0 "\0xad" # small en + 0 "\0xEe" 0 "\0xae" # small o + 0 "\0xEf" 0 "\0xaf" # small pe + 0 "\0xF0" 0 "\0xe0" # small er + 0 "\0xF1" 0 "\0xe1" # small es + 0 "\0xF2" 0 "\0xe2" # small te + 0 "\0xF3" 0 "\0xe3" # small u + 0 "\0xF4" 0 "\0xe4" # small ef + 0 "\0xF5" 0 "\0xe5" # small kha + 0 "\0xF6" 0 "\0xe6" # small tse + 0 "\0xF7" 0 "\0xe7" # small che + 0 "\0xF8" 0 "\0xe8" # small sha + 0 "\0xF9" 0 "\0xe9" # small shcha + 0 "\0xFa" 0 "\0xea" # small hard sign (ier) + 0 "\0xFb" 0 "\0xeb" # small y (iery) + 0 "\0xFc" 0 "\0xec" # small soft sign (ierik) + 0 "\0xFd" 0 "\0xed" # small reverse rounded e + 0 "\0xFe" 0 "\0xee" # small yu + 0 "\0xFf" 0 "\0xef" # small ya diff --git a/support/translit/1251-k8.rus b/support/translit/1251-k8.rus new file mode 100644 index 0000000000..db9ef0a5b3 --- /dev/null +++ b/support/translit/1251-k8.rus @@ -0,0 +1,98 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 5, 1995 +# File 1251-k8.rus + + +# This is a transliteration data file for converting from +# MS Page 1251 (MS WINDOWS) to KOI8. # KOI8 is meant to +# be GOST 19768-74 (used in Relcom/Unix) +# To be used with translit.c program by Jan Labanowski + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xAB" 0 "<<" # openning quote + 0 "\0xBB" 0 ">>" # closing quote + 0 "\0xA8" 0 "\0xB3" # capital Yo + 0 "\0xB8" 0 "\0xA3" # small yo + 0 "\0xC0" 0 "\0xE1" # capital A + 0 "\0xC1" 0 "\0xE2" # capital Be + 0 "\0xC2" 0 "\0xF7" # capital Ve + 0 "\0xC3" 0 "\0xE7" # capital Ghe + 0 "\0xC4" 0 "\0xE4" # capital De + 0 "\0xC5" 0 "\0xE5" # capital Ie + 0 "\0xC6" 0 "\0xF6" # capital Zhe + 0 "\0xC7" 0 "\0xFA" # capital Ze + 0 "\0xC8" 0 "\0xE9" # capital I + 0 "\0xC9" 0 "\0xEA" # capital short I + 0 "\0xCa" 0 "\0xEB" # capital Ka + 0 "\0xCb" 0 "\0xEC" # capital El + 0 "\0xCc" 0 "\0xED" # capital Em + 0 "\0xCd" 0 "\0xEE" # capital En + 0 "\0xCe" 0 "\0xEF" # capital O + 0 "\0xCf" 0 "\0xF0" # capital Pe + 0 "\0xD0" 0 "\0xF2" # capital Er + 0 "\0xD1" 0 "\0xF3" # capital Es + 0 "\0xD2" 0 "\0xF4" # capital Te + 0 "\0xD3" 0 "\0xF5" # capital U + 0 "\0xD4" 0 "\0xE6" # capital Ef + 0 "\0xD5" 0 "\0xE8" # capital Kha + 0 "\0xD6" 0 "\0xE3" # capital Tse + 0 "\0xD7" 0 "\0xFE" # capital Che + 0 "\0xD8" 0 "\0xFB" # capital Sha + 0 "\0xD9" 0 "\0xFD" # capital Shcha + 0 "\0xDa" 0 "\0xFF" # capital hard sign (Ier) + 0 "\0xDb" 0 "\0xF9" # capital Y (Iery) + 0 "\0xDc" 0 "\0xF8" # capital soft sign Ierik + 0 "\0xDd" 0 "\0xFC" # capital reverse round E + 0 "\0xDe" 0 "\0xE0" # capital Yu + 0 "\0xDf" 0 "\0xF1" # capital Ya + 0 "\0xE0" 0 "\0xC1" # small a + 0 "\0xE1" 0 "\0xC2" # small be + 0 "\0xE2" 0 "\0xD7" # small ve + 0 "\0xE3" 0 "\0xC7" # small ghe + 0 "\0xE4" 0 "\0xC4" # small de + 0 "\0xE5" 0 "\0xC5" # small ie + 0 "\0xE6" 0 "\0xD6" # small zhe + 0 "\0xE7" 0 "\0xDA" # small z + 0 "\0xE8" 0 "\0xC9" # small i + 0 "\0xE9" 0 "\0xCA" # small short i + 0 "\0xEa" 0 "\0xCB" # small ka + 0 "\0xEb" 0 "\0xCC" # small el + 0 "\0xEc" 0 "\0xCD" # small em + 0 "\0xEd" 0 "\0xCE" # small en + 0 "\0xEe" 0 "\0xCF" # small o + 0 "\0xEf" 0 "\0xD0" # small pe + 0 "\0xF0" 0 "\0xD2" # small er + 0 "\0xF1" 0 "\0xD3" # small es + 0 "\0xF2" 0 "\0xD4" # small te + 0 "\0xF3" 0 "\0xD5" # small u + 0 "\0xF4" 0 "\0xC6" # small ef + 0 "\0xF5" 0 "\0xC8" # small kha + 0 "\0xF6" 0 "\0xC3" # small tse + 0 "\0xF7" 0 "\0xDE" # small che + 0 "\0xF8" 0 "\0xDB" # small sha + 0 "\0xF9" 0 "\0xDD" # small shcha + 0 "\0xFa" 0 "\0xDF" # small hard sign (ier) + 0 "\0xFb" 0 "\0xD9" # small y (iery) + 0 "\0xFc" 0 "\0xD8" # small soft sign (ierik) + 0 "\0xFd" 0 "\0xDC" # small reverse rounded e + 0 "\0xFe" 0 "\0xC0" # small yu + 0 "\0xFf" 0 "\0xD1" # small ya diff --git a/support/translit/Makefile b/support/translit/Makefile new file mode 100644 index 0000000000..39f62a68f3 --- /dev/null +++ b/support/translit/Makefile @@ -0,0 +1,33 @@ +# Makfile for translit contributed by Dominik Wujastyk <D.Wujastyk@ucl.ac.uk> +# Modified to provide UNIX compilation and commented by +# Jan Labanowski <jkl@osc.edu> +# Read comments in the Makefile and modify it to suit your needs +# When modifying, remember that you need to start all dependencies lines +# (lines which have colon ":" in them) from the first column, and +# lines below them have to start with a TAB character. +# +# Before you can make translit, you need to modify path.h file. +# + +# if you do not use Gnu C, modify the line below to be: +# CC=cc +CC=gcc + +OBJS=translit.o reg_exp.o reg_sub.o + +# For OS/2, change lines below to be: +# translit.exe: $(OBJS) +# $(CC) -O -o translit.exe $(OBJS) # line has initial tab + +translit: $(OBJS) + $(CC) -O -o translit.exe $(OBJS) # line has initial tab + +# Dependencies + +translit.o : translit.c paths.h reg_exp.h +reg_exp.o : reg_exp.c paths.h reg_exp.h +reg_sub.o : reg_sub.c paths.h reg_exp.h + +clean: + rm *.o # change it to del *.o for OS/2 + diff --git a/support/translit/Makefile.os2 b/support/translit/Makefile.os2 new file mode 100644 index 0000000000..a73f581c58 --- /dev/null +++ b/support/translit/Makefile.os2 @@ -0,0 +1,33 @@ +# Makfile for translit contributed by Dominik Wujastyk <D.Wujastyk@ucl.ac.uk> +# Modified to provide UNIX compilation and commented by +# Jan Labanowski <jkl@osc.edu> +# Read comments in the Makefile and modify it to suit your needs +# When modifying, remember that you need to start all dependencies lines +# (lines which have colon ":" in them) from the first column, and +# lines below them have to start with a TAB character. +# +# Before you can make translit, you need to modify path.h file. +# + +# if you do not use Gnu C, modify the line below to be: +# CC=cc or CC=CL (depending on what you are using as C compiler) +CC=gcc + +OBJS=translit.o reg_exp.o reg_sub.o + +# For OS/2, change lines below to be: +# translit.exe: $(OBJS) +# $(CC) -O -o translit.exe $(OBJS) # line has initial tab + +translit: $(OBJS) + $(CC) -O -o translit.exe $(OBJS) # line has initial tab + +# Dependencies + +translit.o : translit.c paths.h reg_exp.h +reg_exp.o : reg_exp.c paths.h reg_exp.h +reg_sub.o : reg_sub.c paths.h reg_exp.h + +clean: + del *.o # line has initial tab + diff --git a/support/translit/Makefile.unx b/support/translit/Makefile.unx new file mode 100644 index 0000000000..e9e25c3786 --- /dev/null +++ b/support/translit/Makefile.unx @@ -0,0 +1,27 @@ +# Makfile for translit contributed by Dominik Wujastyk <D.Wujastyk@ucl.ac.uk> +# Modified to provide UNIX compilation and commented by +# Jan Labanowski <jkl@osc.edu> +# Read comments in the Makefile and modify it to suit your needs +# When modifying, remember that you need to start all dependencies lines +# (lines which have colon ":" in them) from the first column, and +# lines below them have to start with a TAB character. +# +# Before you can make translit, you need to modify path.h file. +# + +CC=cc + +OBJS=translit.o reg_exp.o reg_sub.o + +translit: $(OBJS) + $(CC) -O -o translit $(OBJS) # line has initial tab + +# Dependencies +translit.o : translit.c paths.h reg_exp.h +reg_exp.o : reg_exp.c paths.h reg_exp.h +reg_sub.o : reg_sub.c paths.h reg_exp.h + +clean: + rm *.o # line has initial tab + + diff --git a/support/translit/alt-1251.rus b/support/translit/alt-1251.rus new file mode 100644 index 0000000000..2fd900daa6 --- /dev/null +++ b/support/translit/alt-1251.rus @@ -0,0 +1,98 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 5, 1995 +# File alt-1251.rus + + +# This is a transliteration data file for converting from +# Alternativnyj Variant (ALT/AV) popular under MS-DOS +# to MS Page 1251 (MS WINDOWS) +# To be used with translit.c program by Jan Labanowski + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xf3" 0 "\0xAB" # openning quote + 0 "\0xf4" 0 "\0xBB" # closing quote + 0 "\0xf0" 0 "\0xA8" # capital Yo + 0 "\0xf1" 0 "\0xB8" # small yo + 0 "\0x80" 0 "\0xC0" # capital A + 0 "\0x81" 0 "\0xC1" # capital Be + 0 "\0x82" 0 "\0xC2" # capital Ve + 0 "\0x83" 0 "\0xC3" # capital Ghe + 0 "\0x84" 0 "\0xC4" # capital De + 0 "\0x85" 0 "\0xC5" # capital Ie + 0 "\0x86" 0 "\0xC6" # capital Zhe + 0 "\0x87" 0 "\0xC7" # capital Ze + 0 "\0x88" 0 "\0xC8" # capital I + 0 "\0x89" 0 "\0xC9" # capital short I + 0 "\0x8a" 0 "\0xCa" # capital Ka + 0 "\0x8b" 0 "\0xCb" # capital El + 0 "\0x8c" 0 "\0xCc" # capital Em + 0 "\0x8d" 0 "\0xCd" # capital En + 0 "\0x8e" 0 "\0xCe" # capital O + 0 "\0x8f" 0 "\0xCf" # capital Pe + 0 "\0x90" 0 "\0xD0" # capital Er + 0 "\0x91" 0 "\0xD1" # capital Es + 0 "\0x92" 0 "\0xD2" # capital Te + 0 "\0x93" 0 "\0xD3" # capital U + 0 "\0x94" 0 "\0xD4" # capital Ef + 0 "\0x95" 0 "\0xD5" # capital Kha + 0 "\0x96" 0 "\0xD6" # capital Tse + 0 "\0x97" 0 "\0xD7" # capital Che + 0 "\0x98" 0 "\0xD8" # capital Sha + 0 "\0x99" 0 "\0xD9" # capital Shcha + 0 "\0x9a" 0 "\0xDa" # capital hard sign (Ier) + 0 "\0x9b" 0 "\0xDb" # capital Y (Iery) + 0 "\0x9c" 0 "\0xDc" # capital soft sign Ierik + 0 "\0x9d" 0 "\0xDd" # capital reverse round E + 0 "\0x9e" 0 "\0xDe" # capital Yu + 0 "\0x9f" 0 "\0xDf" # capital Ya + 0 "\0xa0" 0 "\0xE0" # small a + 0 "\0xa1" 0 "\0xE1" # small be + 0 "\0xa2" 0 "\0xE2" # small ve + 0 "\0xa3" 0 "\0xE3" # small ghe + 0 "\0xa4" 0 "\0xE4" # small de + 0 "\0xa5" 0 "\0xE5" # small ie + 0 "\0xa6" 0 "\0xE6" # small zhe + 0 "\0xa7" 0 "\0xE7" # small z + 0 "\0xa8" 0 "\0xE8" # small i + 0 "\0xa9" 0 "\0xE9" # small short i + 0 "\0xaa" 0 "\0xEa" # small ka + 0 "\0xab" 0 "\0xEb" # small el + 0 "\0xac" 0 "\0xEc" # small em + 0 "\0xad" 0 "\0xEd" # small en + 0 "\0xae" 0 "\0xEe" # small o + 0 "\0xaf" 0 "\0xEf" # small pe + 0 "\0xe0" 0 "\0xF0" # small er + 0 "\0xe1" 0 "\0xF1" # small es + 0 "\0xe2" 0 "\0xF2" # small te + 0 "\0xe3" 0 "\0xF3" # small u + 0 "\0xe4" 0 "\0xF4" # small ef + 0 "\0xe5" 0 "\0xF5" # small kha + 0 "\0xe6" 0 "\0xF6" # small tse + 0 "\0xe7" 0 "\0xF7" # small che + 0 "\0xe8" 0 "\0xF8" # small sha + 0 "\0xe9" 0 "\0xF9" # small shcha + 0 "\0xea" 0 "\0xFa" # small hard sign (ier) + 0 "\0xeb" 0 "\0xFb" # small y (iery) + 0 "\0xec" 0 "\0xFc" # small soft sign (ierik) + 0 "\0xed" 0 "\0xFd" # small reverse rounded e + 0 "\0xee" 0 "\0xFe" # small yu + 0 "\0xef" 0 "\0xFf" # small ya diff --git a/support/translit/alt-gos.rus b/support/translit/alt-gos.rus new file mode 100644 index 0000000000..ef8db241ce --- /dev/null +++ b/support/translit/alt-gos.rus @@ -0,0 +1,95 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File alt-gos.rus + +# This is a transliteration data file for converting from ALT (Bryabrins +# alternativnyj variant) to GOSTSCII 84 (approx. ISO-8859-5?) + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence for LaTeX +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xF0" 0 "\0xF0" #capital Yo + 0 "\0xf1" 0 "\0xF1" #small yo + + 0 "\0x80" 0 "\0xB0" A + 0 "\0x81" 0 "\0xB1" Be + 0 "\0x82" 0 "\0xB2" Ve + 0 "\0x83" 0 "\0xB3" Ghe + 0 "\0x84" 0 "\0xB4" De + 0 "\0x85" 0 "\0xB5" Ie + 0 "\0x86" 0 "\0xB6" Zhe + 0 "\0x87" 0 "\0xB7" Ze + 0 "\0x88" 0 "\0xB8" I + 0 "\0x89" 0 "\0xB9" short I + 0 "\0x8A" 0 "\0xBA" Ka + 0 "\0x8B" 0 "\0xBB" El + 0 "\0x8C" 0 "\0xBC" Em + 0 "\0x8D" 0 "\0xBD" En + 0 "\0x8E" 0 "\0xBE" O + 0 "\0x8F" 0 "\0xBF" Pe + 0 "\0x90" 0 "\0xC0" Er + 0 "\0x91" 0 "\0xC1" Es + 0 "\0x92" 0 "\0xC2" Te + 0 "\0x93" 0 "\0xC3" U + 0 "\0x94" 0 "\0xC4" Ef + 0 "\0x95" 0 "\0xC5" Kha + 0 "\0x96" 0 "\0xC6" Tse + 0 "\0x97" 0 "\0xC7" Che + 0 "\0x98" 0 "\0xC8" Sha + 0 "\0x99" 0 "\0xC9" Shcha + 0 "\0x9A" 0 "\0xCA" hard sign (Ier) + 0 "\0x9B" 0 "\0xCB" Y (Iery) + 0 "\0x9C" 0 "\0xCC" soft sign (Ierik) + 0 "\0x9D" 0 "\0xCD" reverse rounded E + 0 "\0x9E" 0 "\0xCE" Yu + 0 "\0x9F" 0 "\0xCF" Ya + 0 "\0xA0" 0 "\0xD0" a + 0 "\0xA1" 0 "\0xD1" be + 0 "\0xA2" 0 "\0xD2" ve + 0 "\0xA3" 0 "\0xD3" ghe + 0 "\0xA4" 0 "\0xD4" de + 0 "\0xA5" 0 "\0xD5" ie + 0 "\0xA6" 0 "\0xD6" zhe + 0 "\0xA7" 0 "\0xD7" z + 0 "\0xA8" 0 "\0xD8" i + 0 "\0xA9" 0 "\0xD9" short i + 0 "\0xAA" 0 "\0xDA" ka + 0 "\0xAB" 0 "\0xDB" el + 0 "\0xAC" 0 "\0xDC" em + 0 "\0xAD" 0 "\0xDD" en + 0 "\0xAE" 0 "\0xDE" o + 0 "\0xAF" 0 "\0xDF" pe + 0 "\0xE0" 0 "\0xE0" er + 0 "\0xE1" 0 "\0xE1" es + 0 "\0xE2" 0 "\0xE2" te + 0 "\0xE3" 0 "\0xE3" u + 0 "\0xE4" 0 "\0xE4" ef + 0 "\0xE5" 0 "\0xE5" kha + 0 "\0xE6" 0 "\0xE6" tse + 0 "\0xE7" 0 "\0xE7" che + 0 "\0xE8" 0 "\0xE8" sha + 0 "\0xE9" 0 "\0xE9" shcha + 0 "\0xEA" 0 "\0xEA" hard sign (ier) + 0 "\0xEB" 0 "\0xEB" y (iery) + 0 "\0xEC" 0 "\0xEC" soft sign (ierik) + 0 "\0xED" 0 "\0xED" reverse rounded e + 0 "\0xEE" 0 "\0xEE" yu + 0 "\0xEF" 0 "\0xEF" ya diff --git a/support/translit/alt-koi8.rus b/support/translit/alt-koi8.rus new file mode 100644 index 0000000000..593431f3d8 --- /dev/null +++ b/support/translit/alt-koi8.rus @@ -0,0 +1,96 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File alt-koi8.rus +# modified to convert \o363 to << and \o363 to >> + +# This is a transliteration data file for converting from ALT to KOI8 +# KOI8 is meant to be GOST 19768-74 (as used by RELCOM). +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xf0" 0 "\0xB3" # capital Yo + 0 "\0xf1" 0 "\0xA3" # small yo + 0 "\0x80" 0 "\0xE1" # capital A + 0 "\0x81" 0 "\0xE2" # capital Be + 0 "\0x82" 0 "\0xF7" # capital Ve + 0 "\0x83" 0 "\0xE7" # capital Ghe + 0 "\0x84" 0 "\0xE4" # capital De + 0 "\0x85" 0 "\0xE5" # capital Ie + 0 "\0x86" 0 "\0xF6" # capital Zhe + 0 "\0x87" 0 "\0xFA" # capital Ze + 0 "\0x88" 0 "\0xE9" # capital I + 0 "\0x89" 0 "\0xEA" # capital short I + 0 "\0x8a" 0 "\0xEB" # capital Ka + 0 "\0x8b" 0 "\0xEC" # capital El + 0 "\0x8c" 0 "\0xED" # capital Em + 0 "\0x8d" 0 "\0xEE" # capital En + 0 "\0x8e" 0 "\0xEF" # capital O + 0 "\0x8f" 0 "\0xF0" # capital Pe + 0 "\0x90" 0 "\0xF2" # capital Er + 0 "\0x91" 0 "\0xF3" # capital Es + 0 "\0x92" 0 "\0xF4" # capital Te + 0 "\0x93" 0 "\0xF5" # capital U + 0 "\0x94" 0 "\0xE6" # capital Ef + 0 "\0x95" 0 "\0xE8" # capital Kha + 0 "\0x96" 0 "\0xE3" # capital Tse + 0 "\0x97" 0 "\0xFE" # capital Che + 0 "\0x98" 0 "\0xFB" # capital Sha + 0 "\0x99" 0 "\0xFD" # capital Shcha + 0 "\0x9a" 0 "\0xFF" # capital hard sign (Ier) + 0 "\0x9b" 0 "\0xF9" # capital Y (Iery) + 0 "\0x9c" 0 "\0xF8" # capital soft sign Ierik + 0 "\0x9d" 0 "\0xFC" # capital reverse round E + 0 "\0x9e" 0 "\0xE0" # capital Yu + 0 "\0x9f" 0 "\0xF1" # capital Ya + 0 "\0xa0" 0 "\0xC1" # small a + 0 "\0xa1" 0 "\0xC2" # small be + 0 "\0xa2" 0 "\0xD7" # small ve + 0 "\0xa3" 0 "\0xC7" # small ghe + 0 "\0xa4" 0 "\0xC4" # small de + 0 "\0xa5" 0 "\0xC5" # small ie + 0 "\0xa6" 0 "\0xD6" # small zhe + 0 "\0xa7" 0 "\0xDA" # small z + 0 "\0xa8" 0 "\0xC9" # small i + 0 "\0xa9" 0 "\0xCA" # small short i + 0 "\0xaa" 0 "\0xCB" # small ka + 0 "\0xab" 0 "\0xCC" # small el + 0 "\0xac" 0 "\0xCD" # small em + 0 "\0xad" 0 "\0xCE" # small en + 0 "\0xae" 0 "\0xCF" # small o + 0 "\0xaf" 0 "\0xD0" # small pe + 0 "\0xe0" 0 "\0xD2" # small er + 0 "\0xe1" 0 "\0xD3" # small es + 0 "\0xe2" 0 "\0xD4" # small te + 0 "\0xe3" 0 "\0xD5" # small u + 0 "\0xe4" 0 "\0xC6" # small ef + 0 "\0xe5" 0 "\0xC8" # small kha + 0 "\0xe6" 0 "\0xC3" # small tse + 0 "\0xe7" 0 "\0xDE" # small che + 0 "\0xe8" 0 "\0xDB" # small sha + 0 "\0xe9" 0 "\0xDD" # small shcha + 0 "\0xea" 0 "\0xDF" # small hard sign (ier) + 0 "\0xeb" 0 "\0xD9" # small y (iery) + 0 "\0xec" 0 "\0xD8" # small soft sign (ierik) + 0 "\0xed" 0 "\0xDC" # small reverse rounded e + 0 "\0xee" 0 "\0xC0" # small yu + 0 "\0xef" 0 "\0xD1" # small ya + 0 "\0xf3" 0 "<<" # opening quote + 0 "\0xf4" 0 ">>" # closeing quote diff --git a/support/translit/announcement b/support/translit/announcement new file mode 100644 index 0000000000..2d9542dfa9 --- /dev/null +++ b/support/translit/announcement @@ -0,0 +1,58 @@ +Submitted-by: jkl@osc.edu (Jan Labanowski) +Archive-name: translit +Last-modified: 20-Jan-1993 +Environment: UNIX, MS-DOS, VMS +Available-from: kekule.osc.edu (128.146.36.48) in /pub/russian/translit +Copyright-note: Yes, you have to distribute complete package. + +Translit --- general transliteration program is available. It transliterates +between different alphabet representations of different languages. + +It is frequently necessary to convert from one representation to another +representation of the foreign alphabet. E.g., in the Library of Congress +transliteration, the Russian letter sha is transliterated as two Latin +letters "sh" while the popular word processors use a code 232 (decimal), +the RELCOM network uses a code 221, and the KOI7 set uses character "[" +for the same letter. So if your screen driver, printer, word processor, +etc. uses different codes than the text file which you have, you need to +transliterate. + +The TRANSLIT program is a powerful tool for such tasks. It converts an input +file in one representation to the output file in another representation using +appropriate, user defined, transliteration table. Transliteration table allows +for very elaborate transliteration tasks and includes provisions for plain +character sequences, character lists, regular expressions (flexible matches), +SHIFT-OUT/IN sequences and more. The program comes with documentation and +examples of popular transliteration schemes. The Russian language serves +as an example. Other files will be added with your collaboration. + +How to get the program? + +First, retrieve file: readme.doc --- it describes the files in the program +distribution and has detailed instructions on how to obtain the program. + +Via FTP (if you are on Internet): +--------------------------------- + ftp kekule.osc.edu (or ftp 128.146.36.48) + Login: anonymous + Password: Your_email_address (Please...) + ftp> ascii + ftp> cd pub/russian/translit + ftp> get readme.doc + ftp> quit + +Via E-mail: +----------- + Send message: + send translit/readme.doc from russian + to OSCPOST@osc.edu or OSCPOST@OHSTPY.BITNET. The file readme.doc will be +forwarded to your mailbox. + +Enjoy, + +Author coordinates: +Jan Labanowski +P.O. Box 21821 +Columbus, OH 43221-0821, USA +jkl@osc.edu, JKL@OHSTPY.BITNET +------------------------------ diff --git a/support/translit/chemlist b/support/translit/chemlist new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/support/translit/chemlist diff --git a/support/translit/ex.junk b/support/translit/ex.junk new file mode 100644 index 0000000000..e9bf582017 --- /dev/null +++ b/support/translit/ex.junk @@ -0,0 +1,103 @@ +á â ÷ ç ä å ³ ö ú é ê ë ì í î ï ð ò ó ô õ æ è ã þ û ý ÿ ù ø ü à ñ <<
+Á Â × Ç Ä Å £ Ö Ú É Ê Ë Ì Í Î Ï Ð Ò Ó Ô Õ Æ È Ã Þ Û Ý ß Ù Ø Ü À Ñ >>
+ (ÉÚ ÇÁÚÅÔÙ <<íÏÓËÏ×ÓËÉÅ ÎÏ×ÏÓÔÉ>>, 6.12.92)
+ ÷ùúï÷ (ÞÁÓÔØ ÐÅÒ×ÁÑ)
+ ÷ ËÁËÏÊ ÓÕÅÔÅ ÍÙ ÓÅÇÏÄÎÑ ÖÉ×£Í. äÁÖÅ ÐÏÌÉÔÉËÁ, É ÔÁ ÄÁ×ÎÏ ÕÖÅ
+ÐÅÒÅÓÔÁÌÁ ÎÁÓ ÚÁÎÉÍÁÔØ. íÙ ÏÂÒÁÝÁÅÍ ÎÁ ÎÅ£ ×ÎÉÍÁÎÉÅ ÔÏÌØËÏ ÔÏÇÄÁ, ËÏÇÄÁ
+ÎÁ×ÅÒÈÕ ÒÁÚÇÏÒÁÅÔÓÑ ÏÞÅÒÅÄÎÁÑ Ó×ÁÒÁ. îÅ ×ÏÌÎÕÀÔ ÎÁÓ É ÍÉÒÏ×ÙÅ ÐÒÏÂÌÅÍÙ.
+þÔÏ Ö, ÚÁÚÅÍÌ£ÎÎÏÓÔØ ÎÁÛÅÇÏ ÂÙÔÉÑ ×ÐÏÌÎÅ ÐÏÎÑÔÎÁ. á ÍÅÖÄÕ ÔÅÍ ÐÒÏÉÓÈÏÄÑÝÅÅ
+×ÏËÒÕÇ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÐÒÉÏÂÒÅÔÁÅÔ ÇÌÏÂÁÌØÎÙÅ ÉÚÍÅÒÅÎÉÑ.
+ ..................................
+ óóóò õíåò. ëôï ðïâåäéì?
+ ...éÔÁË, ÔÏÌØËÏ ÔÅÐÅÒØ ÎÁÞÉÎÁÀÔ ×ÙÒÉÓÏ×Ù×ÁÔØÓÑ ËÏÎÔÕÒÙ ÔÅÈ ÇÒÁÎÄÉÏÚÎÙÈ
+ÐÏÓÌÅÄÓÔ×ÉÊ, ËÏÔÏÒÙÅ Ó×ÑÚÁÎÙ Ó ËÒÁÈÏÍ ËÏÍÍÕÎÉÚÍÁ × óÏ×ÅÔÓËÏÍ óÏÀÚÅ É ÅÇÏ
+ÒÁÓÐÁÄÏÍ. åÝ£ ×ÞÅÒÁ ÚÁÒÕÂÅÖÎÙÅ ÁÎÁÌÉÔÉËÉ Ó ÏÌÉÍÐÉÊÓËÉÍ ÂÅÓÐÒÉÓÔÒÁÓÔÉÅÍ
+×ÚÉÒÁÌÉ ÎÁ ÂÅÚÒÁÓÓÕÄÏÞÎÙÅ ÉÚÇÉÂÙ ÎÁÛÅÇÏ ×ÙÒÙ×ÎÏÇÏ É ÎÅÐÏÎÑÔÎÏÇÏ Ä×ÉÖÅÎÉÑ.
+óÅÇÏÄÎÑ ÕÖÅ ÍÎÏÇÉÍ ÓÔÁÎÏ×ÉÔÓÑ ÑÓÎÏ, ÞÔÏ ÓÕÍÂÕÒÎÙÅ ËÏÎ×ÕÌØÓÉÉ
+ÐÏÓÔËÏÍÍÕÎÉÓÔÉÞÅÓËÏÇÏ ÍÉÒÁ ÓÁÍÙÍ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÙÍ ÏÂÒÁÚÏÍ ÚÁÔÒÁÇÉ×ÁÀÔ
+ÄÁÌØÎÅÊÛÕÀ ÓÕÄØÂÕ ×ÓÅÇÏ ÍÅÖÄÕÎÁÒÏÄÎÏÇÏ ÓÏÏÂÝÅÓÔ×Á. äÁ, ËÏÍÍÕÎÉÚÍ ÒÕÈÎÕÌ,
+óóóò ÉÓÞÅÚ Ó ÐÏÌÉÔÉÞÅÓËÏÊ ËÁÒÔÙ, ÎÏ ÔÅÍ ÓÁÍÙÍ ÂÙÌÁ ÚÁ×ÅÒÛÅÎÁ ÃÅÌÁÑ ÇÌÁ×Á
+× ÉÓÔÏÒÉÉ ×ÓÅÊ ÃÉ×ÉÌÉÚÁÃÉÉ.
+ îÅ ÔÏÌØËÏ ÎÁÓÌÅÄÎÉËÉ ËÏÍÍÕÎÉÚÍÁ, ÎÏ É ÏÓÔÁÌØÎÏÊ ÍÉÒ ÏËÁÚÁÌÉÓØ ×ÄÒÕÇ
+ÐÅÒÅÄ ÞÉÓÔÙÍ ÌÉÓÔÏÍ. ðÏ ÍÅÒÅ ÏÓÏÚÎÁÎÉÑ ÜÔÏÇÏ ÆÁËÔÁ × ÚÁÒÕÂÅÖÎÙÈ
+ÐÏÌÉÔÉÞÅÓËÉÈ ËÒÕÇÁÈ ÐÅÒ×ÁÑ ÜÊÆÏÒÉÑ ÐÏÂÅÄÙ ÎÁÄ <<ÉÍÐÅÒÉÅÊ ÚÌÁ>> É ÎÅËÏÅÇÏ
+ÓÁÍÏÕÄÏ×ÌÅÔ×ÏÒÅÎÉÑ ÓÍÅÎÑÅÔÓÑ ×Ó£ ÂÏÌØÛÅÊ ÏÚÁÂÏÞÅÎÎÏÓÔØÀ, ÒÁÓÔÅÒÑÎÎÏÓÔØÀ,
+Á ËÏÅ-ÇÄÅ É ÐÁÎÉËÏÊ. òÅÞØ ÉÄ£Ô ÎÅ ÔÏÌØËÏ Ï ÔÒÅ×ÏÇÅ, ×ÙÚ×ÁÎÎÏÊ
+ÎÅÐÒÅÄÓËÁÚÕÅÍÏÓÔØÀ ÐÒÏÃÅÓÓÏ× ÎÁ ÔÅÒÒÉÔÏÒÉÉ ×ÞÅÒÁÛÎÅÇÏ óóóò. ëÓÔÁÔÉ, ÐÏËÁ
+ÏÎÉ ÎÅ ÐÒÉÎÑÌÉ ÓÔÏÌØ ÁÐÏËÁÌÉÐÓÉÞÅÓËÏÊ ÆÏÒÍÙ, ËÁË ÏÖÉÄÁÌÉ ÍÎÏÇÉÅ, É
+ÐÒÏÔÅËÁÀÔ × ÏÔÌÉÞÉÅ ÏÔ àÇÏÓÌÁ×ÉÉ ÂÏÌÅÅ ÃÉ×ÉÌÉÚÏ×ÁÎÎÏ.
+ ÷ÄÒÕÇ Ó ÏÞÅ×ÉÄÎÏÓÔØÀ ÏÔËÒÙÌÏÓØ ÄÒÕÇÏÅ - ÞÔÏ, ÎÅÓÍÏÔÒÑ ÎÁ ×ÎÅÛÎÅ
+ÁÂÓÏÌÀÔÎÕÀ ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÓÔØ ÚÁÐÁÄÎÏÊ É ËÏÍÍÕÎÉÓÔÉÞÅÓËÏÊ ÓÉÓÔÅÍ, ÏÎÉ
+×ÚÁÉÍÏÓ×ÑÚÁÎÙ. íÅÈÁÎÉÚÍ ÒÁÚ×ÉÔÉÑ ÔÏÊ É ÄÒÕÇÏÊ, ËÁË ÔÅÐÅÒØ ÏÂÎÁÒÕÖÉ×ÁÅÔÓÑ,
+ÂÙÌ ÚÁÐÒÏÇÒÁÍÍÉÒÏ×ÁÎ ÎÁ ÎÁÌÉÞÉÅ Ó×ÏÅÇÏ ÁÎÔÁÇÏÎÉÓÔÁ.
+ åÝ£ ÐÒÅÄÓÔÏÉÔ ÒÁÚÏÂÒÁÔØÓÑ, × ËÁËÏÊ ÓÔÅÐÅÎÉ ÔÅ ÉÌÉ ÉÎÙÅ ÔÅÎÄÅÎÃÉÉ
+ÏÂÝÅÓÔ×ÅÎÎÏÊ ÖÉÚÎÉ úÁÐÁÄÁ Ñ×ÉÌÉÓØ ÒÅÚÕÌØÔÁÔÏÍ ÅÇÏ ×ÎÕÔÒÅÎÎÙÊ Ü×ÏÌÀÃÉÉ, Á
+× ËÁËÏÊ ÂÙÌÉ ÏÂÕÓÌÏ×ÌÅÎÙ ÓÕÝÅÓÔ×Ï×ÁÎÉÅÍ ËÏÍÍÕÎÉÓÔÉÞÅÓËÏÇÏ ÏÂÝÅÓÔ×Á, É
+ÎÁÏÂÏÒÏÔ. îÏ ÚÁÐÁÄÎÙÊ ÍÉÒ, ÔÁË ÄÏÌÇÏ É ÁËÔÉ×ÎÏ ÄÏÂÉ×Á×ÛÉÊÓÑ ËÏÎÃÁ
+ËÏÍÍÕÎÉÚÍÁ, ÏËÁÚÁÌÓÑ ÎÅ ÐÏÄÇÏÔÏ×ÌÅÎÎÙÍ Ë ÖÉÚÎÉ ÐÏÓÌÅ ÅÇÏ ÐÁÄÅÎÉÑ. ïÎÏ
+ÎÁÒÕÛÉÌÏ ÇÌÏÂÁÌØÎÕÀ ÓÉÓÔÅÍÕ ÂÅÚÏÐÁÓÎÏÓÔÉ É ÏÂÝÅÖÉÔÉÑ, ËÏÔÏÒÁÑ ÓËÒÕÐÕÌ£ÚÎÏ
+ÓÏÚÄÁ×ÁÌÁÓØ ÐÏÓÌÅ ×ÔÏÒÏÊ ÍÉÒÏ×ÏÊ ×ÏÊÎÙ, ÕÓÐÅÌÁ ÏÂÒÁÓÔÉ Ó×ÏÅÊ ÂÀÒÏËÒÁÔÉÅÊ É
+ÐÏÌÕÞÉÔØ ÄÁÖÅ ÓÏÂÓÔ×ÅÎÎÕÀ ÌÏÇÉËÕ ÒÁÚ×ÉÔÉÑ. á ÔÕÔ × ÏÄÎÏ ÍÇÎÏ×ÅÎÉÅ ÜÔÏÔ
+ÍÉÒÏÐÏÒÑÄÏË ÒÁÚ×ÁÌÉÌÓÑ.
+ ÷ÍÅÓÔÅ Ó ÎÉÍ ÐÏËÁÞÎÕÌÁÓØ ×ÓÑ ÒÁÚ×ÅÔ×Ì£ÎÎÁÑ ÓÉÓÔÅÍÁ ÉÎÓÔÉÔÕÔÏ× É
+ÃÅÎÎÏÓÔÅÊ, ÎÁ ËÏÔÏÒÙÈ ÄÏ ÓÉÈ ÐÏÒ ÄÅÒÖÁÌÏÓØ ÈÒÕÐËÏÅ ÍÉÒÏ×ÏÅ ÒÁ×ÎÏ×ÅÓÉÅ.
+óÔÁÌÏ ÑÓÎÏ, ÞÔÏ ÎÅ ÔÏÌØËÏ ÂÙ×ÛÉÍ ËÏÍÍÕÎÉÓÔÉÞÅÓËÉÍ ÇÏÓÕÄÁÒÓÔ×ÁÍ, ÎÏ É
+×ÓÅÍÕ ÍÉÒÏ×ÏÍÕ ÓÏÏÂÝÅÓÔ×Õ ÐÒÅÄÓÔÏÉÔ ÉÓËÁÔØ ÎÏ×ÙÅ ÆÏÒÍÙ ÓÕÝÅÓÔ×Ï×ÁÎÉÑ.
+ðÒÉÄ£ÔÓÑ ÚÁÎÏ×Ï ÏÓÍÙÓÌÉ×ÁÔØ ÍÎÏÇÉÅ ×ÏÐÒÏÓÙ, ËÁÚÁ×ÛÉÅÓÑ ÒÁÚ É ÎÁ×ÓÅÇÄÁ
+ÒÅÛ£ÎÎÙÍÉ. óËÁÖÅÍ, ÓÔÁÂÉÌØÎÏÓÔØ ÇÒÁÎÉà ÉÌÉ ÏÂÅÓÐÅÞÅÎÉÅ ÃÅÌÏÓÔÎÏÓÔÉ
+ÇÏÓÕÄÁÒÓÔ×. á ÐÒÁ×Á ÎÁÃÉÊ ÎÁ ÓÁÍÏÏÐÒÅÄÅÌÅÎÉÅ, ÎÏ×ÙÊ ÆÅÄÅÒÁÌÉÚÍ É
+ÓÏÞÅÔÁÎÉÅ ËÒÉÔÅÒÉÅ× ÎÁÃÉÏÎÁÌØÎÏÇÏ ×ÏÚÒÏÖÄÅÎÉÑ É ÄÅÍÏËÒÁÔÉÉ? óÅÇÏÄÎÑ ÜÔÉ
+×ÏÐÒÏÓÙ ÐÏÄÎÑÔÙ ÐÏÓÔËÏÍÍÕÎÉÓÔÉÞÅÓËÉÍÉ ÏÂÝÅÓÔ×ÁÍÉ. îÏ ×ÏÔ-×ÏÔ Ë ÎÉÍ ×ÎÏ×Ø
+×ÏÚ×ÒÁÔÑÔÓÑ (ÕÖÅ ×ÏÚ×ÒÁÝÁÀÔÓÑ) ÇÏÓÕÄÁÒÓÔ×Á áÚÉÉ É áÆÒÉËÉ, ÇÄÅ
+ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ÐÒÏÃÅÓÓÙ ÂÙÌÉ × Ó×Ï£ ×ÒÅÍÑ ÉÓËÕÓÓÔ×ÅÎÎÏ ÚÁÍÏÒÏÖÅÎÙ.
+ ðÒÉÈÏÄÉÔÓÑ ÐÒÅÏÄÏÌÅ×ÁÔØ É ÎÁÛÉ ÎÅÄÁ×ÎÉÅ ÉÌÌÀÚÉÉ. óËÏÌØËÏ ÂÙÌÏ
+×ÏÓÔÏÒÇÏ× ÐÏ ÐÏ×ÏÄÕ ÒÁÓÐÁÄÁ ÂÉÐÏÌÑÎÏÊ ÓÉÓÔÅÍÙ ÍÅÖÄÕ ÎÁÒÏÄÎÙÈ ÏÔÎÏÛÅÎÉÊ,
+ÐÏËÏÉ×ÛÅÊÓÑ ÎÁ ÓÏÐÅÒÎÉÞÅÓÔ×Å É ×ÚÁÉÍÎÏÍ ÓÄÅÒÖÉ×ÁÎÉÉ Ä×ÕÈ ÑÄÅÒÎÙÈ
+Ó×ÅÒÈÄÅÒÖÁ× - óûá É óóóò. äÕÍÁÌÏÓØ, ×ÏÔ ÏÎÏ, ÎÁÓÔÕÐÌÅÎÉÅ ÄÁ×ÎÏ
+ÉÓËÏÍÏÇÏ ÂÅÚÏÂÌÁÞÎÏÇÏ ÍÉÒÏÐÏÒÑÄËÁ. îÅ ÔÕÔ-ÔÏ ÂÙÌÏ. õÇÒÏÚÁ ÇÌÏÂÁÌØÎÏÊ
+ÑÄÅÒÎÏÊ ËÏÎÆÒÏÎÔÁÃÉÉ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÎÉÚÉÌÁÓØ. îÏ ×ÚÁÍÅÎ ÂÙ×ÛÅÇÏ
+ËÏÍÍÕÎÉÓÔÉÞÅÓËÏÇÏ ÌÁÇÅÒÑ ÍÉÒ ÐÏÌÕÞÉÌ ÃÅÌÙÊ <<ÂÕËÅÔ>> ÐÒÏÂÌÅÍ - É ÒÏÖÄÅÎÉÅ
+ÎÏ×ÙÈ ÇÏÓÕÄÁÒÓÔ×, É ÐÅÒÅÓÍÏÔÒ ÇÒÁÎÉÃ, É ËÏÎÆÌÉËÔÙ ÐÏ ÐÏ×ÏÄÕ ÐÒÁ×
+ÎÁÃÍÅÎØÛÉÎÓÔ×, É ÎÁËÏÎÅÃ, ÓÒÁÚÕ Ä×Å ×ÏÊÎÙ - ÎÁ âÁÌËÁÎÁÈ É ëÁ×ËÁÚÅ. ôÁËÏ×Ï
+ÐÒÑÍÏÅ ÓÌÅÄÓÔ×ÉÅ ÐÁÄÅÎÉÑ óóóò, ÖÅÌÅÚÎÏÊ È×ÁÔËÏÊ ÐÏÄÁ×ÌÑ×ÛÅÇÏ, ÚÁÇÏÎÑ×ÛÅÇÏ
+×Ï×ÎÕÔÒØ ×ÓÅ ÐÒÏÔÉ×ÏÒÅÞÉÑ ×ÎÕÔÒÉ ÓÅÂÑ É × ÓÆÅÒÅ Ó×ÏÅÇÏ ×ÌÉÑÎÉÑ, ÞÔÏ ÔÅÍ
+ÓÁÍÙÍ ÕÓÉÌÉ×ÁÌÏ ÍÏÝØ ÉÈ ÐÏÔÅÎÃÉÁÌØÎÏÇÏ ×ÚÒÙ×Á ÐÏÓÌÅ ×ÙÈÏÄÁ ÎÁ ÐÏ×ÅÒÈÎÏÓÔØ.
+ üèï óï÷åôóëïçï òáóðáäá
+ äÁÎÎÙÊ ÈÏÄ ÓÏÂÙÔÉÊ ÍÏÖÎÏ ÂÙÌÏ ÌÅÇËÏ ÐÒÏÇÎÏÚÉÒÏ×ÁÔØ. îÏ ÍÁÌÏ ËÔÏ ÄÕÍÁÌ,
+ËÁËÏ×Ï ÂÕÄÅÔ ×ÌÉÑÎÉÅ ÓÏ×ÅÔÓËÏÇÏ ËÒÕÛÅÎÉÑ ÎÁ ×ÚÁÉÍÏÏÔÎÏÛÅÎÉÑ ×ÎÕÔÒÉ ÚÁÐÁÄÎÏÇÏ
+ÓÏÏÂÝÅÓÔ×Á. óÅÇÏÄÎÑ ÕÖÅ ÏÞÅ×ÉÄÎÏ, ÞÔÏ óÏÀÚ ÂÙÌ ÎÅÍÁÌÏ×ÁÖÎÙÍ ÆÁËÔÏÒÏÍ
+ÓÐÌÏÞÅÎÉÑ ÜÔÏÇÏ ÓÏÏÂÝÅÓÔ×Á É ÒÁÓÐÁÄ ÓÏ×ÅÔÓËÏÇÏ ÇÏÓÕÄÁÒÓÔ×Á Ñ×ÉÌÓÑ ÔÏÌÞËÏÍ,
+ËÏÔÏÒÙÊ ÕÓÉÌÉÌ ÎÁ úÁÐÁÄÅ ÃÅÎÔÒÏÂÅÖÎÙÅ ÔÅÎÄÅÎÃÉÉ, ×ÙÑ×ÉÌ ÎÅÓÏ×ÐÁÄÅÎÉÅ
+ÉÎÔÅÒÅÓÏ× ÉÎÄÕÓÔÒÉÁÌØÎÙÈ ÓÔÒÁÎ. îÁ ÆÏÎÅ ÔÅÎÄÅÎÃÉÊ, ÎÁÍÅÔÉ×ÛÉÈÓÑ ×ÎÕÔÒÉ åó,
+ÄÁÌØÎÅÊÛÁÑ ÓÕÄØÂÁ Å×ÒÏÐÅÊÓËÏÊ ÉÎÔÅÇÒÁÃÉÉ ÕÖÅ ÎÅ ×ÙÇÌÑÄÉÔ ÂÅÚÏÂÌÁÞÎÏÊ.
+ëÏÎÅÞÎÏ, ÏÂßÑÓÎÑÅÔÓÑ ÜÔÏ ×ÎÕÔÒÅÎÎÉÍÉ ÐÒÏÃÅÓÓÁÍÉ × ÚÁÐÁÄÎÏÅ×ÒÏÐÅÊÓËÉÈ ÓÔÒÁÎÁÈ.
+ôÏÔ ÆÁËÔ, ÞÔÏ ÐÒÁËÔÉÞÅÓËÉ ÐÏ×ÓÀÄÕ ÎÁÞÁÌÉ ×ÄÒÕÇ ÇÏ×ÏÒÉÔØ ÎÅ Ï ÉÎÔÅÇÒÁÃÉÉ,
+Á Ï ÎÁÃÉÏÎÁÌØÎÙÈ ÉÎÔÅÒÅÓÁÈ, ÔÒÅÂÏ×ÁÔØ ÎÅ ÒÁÓÐÁÈÎÕÔØ ÏËÎÏ × ÍÉÒ, Á ÏÐÕÓÔÉÔØ
+ÛÔÏÒÙ, ×Ï ÍÎÏÇÏÍ Ñ×ÌÑÅÔÓÑ ÓÌÅÄÓÔ×ÉÅÍ ÐÏÐÒÁ×ÌÅÎÉÑ ÏÂÝÅÓÔ×ÅÎÎÏÇÏ ÍÎÅÎÉÑ,
+ÁËÔÉ×ÉÉÚÁÃÉÉ ÎÁÃÉÏÎÁÌÉÓÔÉÞÅÓËÉÈ ÇÒÕÐÐÉÒÏ×ÏË, ÐÏ×ÓÅÍÅÓÔÎÏÇÏ ÕÈÕÄÛÅÎÉÑ
+ÜËÏÎÏÍÉÞÅÓËÏÊ ÓÉÔÕÁÃÉÉ.
+ îÏ, × Ó×ÏÀ ÏÞÅÒÅÄØ, ×ÓÅ ÜÔÉ ÐÒÏÃÅÓÓÙ ÐÒÑÍÏ Ó×ÑÚÁÎÙ Ó ÉÚÍÅÎÅÎÉÅÍ
+ÐÒÉ×ÙÞÎÏÇÏ ÏËÒÕÖÅÎÉÑ úÁÐÁÄÎÏÊ å×ÁÒÏÐÙ. ïÎÁ ÏËÁÚÁÌÁÓØ ÌÉÃÏÍ Ë ÌÉÃÕ Ó
+ÎÅÓÔÁÂÉÌØÎÙÍÉ É ÎÅÐÒÅÄÓËÁÚÕÅÍÙÍÉ ÐÏÓÔËÏÍÍÕÎÉÓÔÉÞÅÓËÉÍÉ ÏÂÝÅÓÔ×ÁÍÉ. þÅÍ
+ÄÁÌØÛÅ, ÔÅÍ ÂÏÌØÛÉÍ ÐÏÄÏÚÒÅÎÉÅÍ ÚÁÐÁÄÎÙÊ ÏÂÙ×ÁÔÅÌØ ÓÍÏÔÒÉÔ × ÉÈ ÓÔÏÒÏÎÕ,
+ÎÅÓÌÕÛÁ×ÛÉÓØ ÐÒÏÇÎÏÚÏ× Ï ÇÏÔÏ×ÑÝÉÈÓÑ ÚÁÈÌÅÓÔÎÕÔØ å×ÒÏÐÕ ÍÁÓÓÏ×ÙÈ ÎÁÛÅÓÔ×ÉÑÈ
+ÍÉÇÒÁÎÔÏ× É ÐÒÏÞÉÈ ÎÅÐÒÉÑÔÎÏÓÔÑÈ.
+ óÁÍÙÅ ËÒÕÐÎÙÅ, ÒÁÚÕÍÅÅÔÓÑ, ÏÖÉÄÁÀÔÓÑ ÓÏ ÓÔÏÒÏÎÙ ÂÙ×ÛÅÇÏ óÏ×ÅÔÓËÏÇÏ
+óÏÀÚÁ, ËÏÔÏÒÙÊ ÞÁÝÅ ×ÓÅÇÏ ×ÏÓÐÒÉÎÉÍÁÅÔÓÑ ËÁË ÐÏÔÅÎÃÉÁÌØÎÙÊ ÉÓÔÏÞÎÉË ÑÄÅÒÎÙÈ
+ËÁÔÁÓÔÒÏÆ É ËÒÏ×Á×ÙÈ ÍÅÖÎÁÃÉÏÎÁÌØÎÙÈ ËÏÎÆÌÉËÔÏ×. ÷ÏÔ ×ÁÍ É ÐÏÞ×Á ÄÌÑ ÎÏ×ÙÈ
+ÓÔÒÁÈÏ×; ×ÏÔ É ÉÓÔÏËÉ ×ÎÅÚÁÐÎÏÇÏ ËÏÎÓÅÒ×ÁÔÉ×ÎÏÇÏ ËÒÅÎÁ ÚÁÐÁÄÎÏÇÏ ÏÂÝÅÓÔ×Á,
+ÅÇÏ ÔÑÔÏÔÅÎÉÑ Ë ÂÏÌÅÅ ÖÅÓÔËÏÍÕ ÒÅÖÉÍÕ, Á ÚÁÏÄÎÏ É Ë ÎÏ×ÏÍÕ ÒÁÚÄÅÌÉÔÅÌØÎÏÍÕ
+ÚÁÎÁ×ÅÓÕ, ËÏÔÏÒÙÊ ÂÙ ÏÇÒÁÄÉÌ ÅÇÏ ÏÔ ÎÁÛÅÊ ÞÁÓÔÉ Ó×ÅÔÁ.
+ ðÒÉÍÅÒ çÅÒÍÁÎÉÉ, ÒÅÛÉ×ÛÅÊ × ÏÔ×ÅÔ ÎÁ ÐÏÇÒÏÍÙ ×ÙÄ×ÏÒÉÔØ ÚÁ Ó×ÏÉ ÐÒÅÄÅÌÙ
+ÔÙÓÑÞÉ ÒÕÍÙÎÓËÉÈ ÃÙÇÁÎ É ÄÁÖÅ ÉÚÍÅÎÉÔØ ËÏÎÓÔÉÔÕÃÉÀ Ó ÔÅÍ, ÞÔÏÂÙ ÏÇÒÁÎÉÞÉÔØ
+ÞÉÓÌÏ ÐÒÅÔÅÎÄÅÎÔÏ× ÎÁ ÐÏÌÉÔÉÞÅÓËÏÅ ÕÂÅÖÉÝÅ, Ó×ÉÄÅÔÅÌØÓÔ×ÕÅÔ Ï ÔÏÍ, ÞÔÏ
+ÐÒÁ×ÑÝÉÅ ÚÁÐÁÄÎÙÅ ËÒÕÇÉ ×ÙÎÕÖÄÅÎÙ ÒÅÁÇÉÒÏ×ÁÔØ ÎÁ ÎÏ×ÙÅ ÓÔÒÁÈÉ. ÷ÏÚÎÉËÁÅÔ
+×ÏÐÒÏÓ: Á ÎÅ ÚÁÓÔÁ×ÑÔ ÌÉ ÜÔÉ ÓÔÒÁÈÉ × ÕÓÌÏ×ÉÑÈ ×ÏÚÍÏÖÎÏÇÏ ÕÈÕÄÛÅÎÉÑ
+ÜËÏÎÏÍÉÞÅÓËÏÇÏ ÐÏÌÏÖÅÎÉÑ ÂÏÌØÛÉÎÓÔ×Á Å×ÒÏÐÅÊÓËÉÈ ÇÏÓÕÄÁÒÓÔ× ÐÒÏÊÔÉ ÉÈ
+ÞÅÒÅÚ ÂÏÌÅÚÎÅÎÎÙÅ ÉÓÐÙÔÁÎÉÑ ÎÁ ÐÒÉ×ÅÒÖÅÎÎÏÓÔØ ÉÄÅÑÍ ÄÅÍÏËÒÁÔÉÉ?
+ ÷ ÐÒÉ×ÅÒÖÅÎÎÏÓÔÉ ÅÊ Õ ÎÙÎÅÛÎÉÈ ÐÒÁ×ÑÝÉÈ ÜÌÉÔ úÁÐÁÄÁ ÓÏÍÎÅÎÉÊ ÎÅÔ.
+îÏ ËÁËÉÍ ÂÕÄÅÔ ÎÏ×ÏÅ ÐÏËÏÌÅÎÉÅ ÐÏÌÉÔÉÞÅÓËÉÈ ÄÅÑÔÅÌÅÊ, ÎÅ ÐÏÊÄ£Ô ÌÉ ÏÎÏ
+ÎÁ ÐÏ×ÏÄÕ Õ ÐÏÐÒÁ×Å×ÛÅÊ ÞÁÓÔÉ ÏÂÝÅÓÔ×Á? ðÏÎÑÔÎÏ, ÞÔÏ ÜÔÏÔ ×ÏÐÒÏÓ ÞÁÝÅ
+×ÓÅÇÏ ÓÏÐÒÏ×ÏÖÄÁÅÔÓÑ ÔÒÅ×ÏÖÎÙÍ ×ÚÇÌÑÄÏÍ × ÓÔÏÒÏÎÕ çÅÒÍÁÎÉÉ, ÐÒÅ×ÒÁÝÁÀÝÅÊÓÑ
+ÓÅÇÏÄÎÑ × ÄÏÍÉÎÉÒÕÀÝÉÊ ÆÁËÔÏÒ Å×ÒÏÐÅÊÓËÏÊ ÓÃÅÎÙ.
+ (ÏËÏÎÞÁÎÉÅ ÓÌÅÄÕÅÔ)
diff --git a/support/translit/example.alt b/support/translit/example.alt new file mode 100644 index 0000000000..7c42f81c94 --- /dev/null +++ b/support/translit/example.alt @@ -0,0 +1,103 @@ +€ ‚ ƒ „ … ð † ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ ó
+ ¡ ¢ £ ¤ ¥ ñ ¦ § ¨ © ª « ¬ ® ¯ à á â ã ä å æ ç è é ê ë ì í î ï ô
+ (¨§ £ §¥âë óŒ®áª®¢áª¨¥ ®¢®áâ¨ô, 6.12.92)
+ ‚›‡Ž‚ (ç áâì ¯¥à¢ ï)
+ ‚ ª ª®© áã¥â¥ ¬ë ᥣ®¤ï ¦¨¢ñ¬. „ ¦¥ ¯®«¨â¨ª , ¨ â ¤ ¢® 㦥
+¯¥à¥áâ « á § ¨¬ âì. Œë ®¡à é ¥¬ ¥ñ ¢¨¬ ¨¥ ⮫쪮 ⮣¤ , ª®£¤
+ ¢¥àåã à §£®à ¥âáï ®ç¥à¥¤ ï ᢠà . ¥ ¢®«ãîâ á ¨ ¬¨à®¢ë¥ ¯à®¡«¥¬ë.
+—â® ¦, § §¥¬«ñ®áâì 襣® ¡ëâ¨ï ¢¯®«¥ ¯®ïâ . € ¬¥¦¤ã ⥬ ¯à®¨á室ï饥
+¢®ªà㣠¤¥©áâ¢¨â¥«ì® ¯à¨®¡à¥â ¥â £«®¡ «ìë¥ ¨§¬¥à¥¨ï.
+ ..................................
+ ‘‘‘ “Œ…. Š’Ž Ž…„ˆ‹?
+ ...ˆâ ª, ⮫쪮 ⥯¥àì ç¨ îâ ¢ëà¨á®¢ë¢ âìáï ª®âãàë â¥å £à ¤¨®§ëå
+¯®á«¥¤á⢨©, ª®â®àë¥ á¢ï§ ë á ªà 宬 ª®¬¬ã¨§¬ ¢ ‘®¢¥â᪮¬ ‘®î§¥ ¨ ¥£®
+à ᯠ¤®¬. …éñ ¢ç¥à § àã¡¥¦ë¥ «¨â¨ª¨ á ®«¨¬¯¨©áª¨¬ ¡¥á¯à¨áâà á⨥¬
+¢§¨à «¨ ¡¥§à áá㤮çë¥ ¨§£¨¡ë 襣® ¢ëà뢮£® ¨ ¥¯®ï⮣® ¤¢¨¦¥¨ï.
+‘¥£®¤ï 㦥 ¬®£¨¬ áâ ®¢¨âáï ïá®, çâ® á㬡ãàë¥ ª®¢ã«ìᨨ
+¯®á⪮¬¬ã¨áâ¨ç¥áª®£® ¬¨à á ¬ë¬ ¥¯®á।áâ¢¥ë¬ ®¡à §®¬ § âà £¨¢ îâ
+¤ «ì¥©èãî áã¤ì¡ã ¢á¥£® ¬¥¦¤ã த®£® á®®¡é¥á⢠. „ , ª®¬¬ã¨§¬ àãåã«,
+‘‘‘ ¨á祧 á ¯®«¨â¨ç¥áª®© ª àâë, ® ⥬ á ¬ë¬ ¡ë« § ¢¥àè¥ æ¥« ï £« ¢
+¢ ¨áâ®à¨¨ ¢á¥© 樢¨«¨§ 樨.
+ ¥ ⮫쪮 á«¥¤¨ª¨ ª®¬¬ã¨§¬ , ® ¨ ®á⠫쮩 ¬¨à ®ª § «¨áì ¢¤àã£
+¯¥à¥¤ ç¨áâë¬ «¨á⮬. ® ¬¥à¥ ®á®§ ¨ï í⮣® ä ªâ ¢ § àã¡¥¦ëå
+¯®«¨â¨ç¥áª¨å ªàã£ å ¯¥à¢ ï í©ä®à¨ï ¯®¡¥¤ë ¤ 󨬯¥à¨¥© §« ô ¨ ¥ª®¥£®
+á ¬®ã¤®¢«¥â¢®à¥¨ï ᬥï¥âáï ¢áñ ¡®«ì襩 ®§ ¡®ç¥®áâìî, à áâ¥àï®áâìî,
+ ª®¥-£¤¥ ¨ ¯ ¨ª®©. ¥çì ¨¤ñâ ¥ ⮫쪮 ® âॢ®£¥, ¢ë§¢ ®©
+¥¯à¥¤áª §ã¥¬®áâìî ¯à®æ¥áᮢ â¥àà¨â®à¨¨ ¢ç¥à 襣® ‘‘‘. Šáâ â¨, ¯®ª
+®¨ ¥ ¯à¨ï«¨ áâ®«ì ¯®ª «¨¯á¨ç¥áª®© ä®à¬ë, ª ª ®¦¨¤ «¨ ¬®£¨¥, ¨
+¯à®â¥ª îâ ¢ ®â«¨ç¨¥ ®â ž£®á« ¢¨¨ ¡®«¥¥ 樢¨«¨§®¢ ®.
+ ‚¤àã£ á ®ç¥¢¨¤®áâìî ®âªàë«®áì ¤à㣮¥ - çâ®, ¥á¬®âàï ¢¥è¥
+ ¡á®«îâãî ¯à®â¨¢®¯®«®¦®áâì § ¯ ¤®© ¨ ª®¬¬ã¨áâ¨ç¥áª®© á¨á⥬, ®¨
+¢§ ¨¬®á¢ï§ ë. Œ¥å ¨§¬ à §¢¨â¨ï ⮩ ¨ ¤à㣮©, ª ª ⥯¥àì ®¡ à㦨¢ ¥âáï,
+¡ë« § ¯à®£à ¬¬¨à®¢ «¨ç¨¥ ᢮¥£® â £®¨áâ .
+ …éñ ¯à¥¤á⮨â à §®¡à âìáï, ¢ ª ª®© á⥯¥¨ ⥠¨«¨ ¨ë¥ ⥤¥æ¨¨
+®¡é¥á⢥®© ¦¨§¨ ‡ ¯ ¤ «¨áì १ã«ìâ ⮬ ¥£® ¢ãâà¥ë© í¢®«î樨,
+¢ ª ª®© ¡ë«¨ ®¡ãá«®¢«¥ë áãé¥á⢮¢ ¨¥¬ ª®¬¬ã¨áâ¨ç¥áª®£® ®¡é¥á⢠, ¨
+ ®¡®à®â. ® § ¯ ¤ë© ¬¨à, â ª ¤®«£® ¨ ªâ¨¢® ¤®¡¨¢ ¢è¨©áï ª®æ
+ª®¬¬ã¨§¬ , ®ª § «áï ¥ ¯®¤£®â®¢«¥ë¬ ª ¦¨§¨ ¯®á«¥ ¥£® ¯ ¤¥¨ï. Ž®
+ àã訫® £«®¡ «ìãî á¨á⥬㠡¥§®¯ á®á⨠¨ ®¡é¥¦¨â¨ï, ª®â®à ï áªàã¯ã«ñ§®
+ᮧ¤ ¢ « áì ¯®á«¥ ¢â®à®© ¬¨à®¢®© ¢®©ë, ãᯥ« ®¡à á⨠᢮¥© ¡îபà ⨥© ¨
+¯®«ãç¨âì ¤ ¦¥ ᮡá⢥ãî «®£¨ªã à §¢¨â¨ï. € âãâ ¢ ®¤® ¬£®¢¥¨¥ íâ®â
+¬¨à®¯®à冷ª à §¢ «¨«áï.
+ ‚¬¥áâ¥ á ¨¬ ¯®ª çã« áì ¢áï à §¢¥â¢«ñ ï á¨á⥬ ¨áâ¨âã⮢ ¨
+楮á⥩, ª®â®àëå ¤® á¨å ¯®à ¤¥à¦ «®áì åà㯪®¥ ¬¨à®¢®¥ à ¢®¢¥á¨¥.
+‘â «® ïá®, çâ® ¥ ⮫쪮 ¡ë¢è¨¬ ª®¬¬ã¨áâ¨ç¥áª¨¬ £®á㤠àá⢠¬, ® ¨
+¢á¥¬ã ¬¨à®¢®¬ã á®®¡é¥áâ¢ã ¯à¥¤á⮨⠨᪠âì ®¢ë¥ ä®à¬ë áãé¥á⢮¢ ¨ï.
+ਤñâáï § ®¢® ®á¬ë᫨¢ âì ¬®£¨¥ ¢®¯à®áë, ª § ¢è¨¥áï à § ¨ ¢á¥£¤
+à¥èñ묨. ‘ª ¦¥¬, áâ ¡¨«ì®áâì £à ¨æ ¨«¨ ®¡¥á¯¥ç¥¨¥ 楫®áâ®áâ¨
+£®á㤠àáâ¢. € ¯à ¢ 権 á ¬®®¯à¥¤¥«¥¨¥, ®¢ë© 䥤¥à «¨§¬ ¨
+á®ç¥â ¨¥ ªà¨â¥à¨¥¢ 樮 «ì®£® ¢®§à®¦¤¥¨ï ¨ ¤¥¬®ªà ⨨? ‘¥£®¤ï íâ¨
+¢®¯à®áë ¯®¤ïâë ¯®á⪮¬¬ã¨áâ¨ç¥áª¨¬¨ ®¡é¥á⢠¬¨. ® ¢®â-¢®â ª ¨¬ ¢®¢ì
+¢®§¢à âïâáï (㦥 ¢®§¢à é îâáï) £®á㤠àá⢠€§¨¨ ¨ €äਪ¨, £¤¥
+ᮮ⢥âáâ¢ãî騥 ¯à®æ¥ááë ¡ë«¨ ¢ ᢮ñ ¢à¥¬ï ¨áªãáá⢥® § ¬®à®¦¥ë.
+ à¨å®¤¨âáï ¯à¥®¤®«¥¢ âì ¨ è¨ ¥¤ ¢¨¥ ¨««î§¨¨. ‘ª®«ìª® ¡ë«®
+¢®áâ®à£®¢ ¯® ¯®¢®¤ã à ᯠ¤ ¡¨¯®«ï®© á¨áâ¥¬ë ¬¥¦¤ã தëå ®â®è¥¨©,
+¯®ª®¨¢è¥©áï ᮯ¥à¨ç¥á⢥ ¨ ¢§ ¨¬®¬ ᤥন¢ ¨¨ ¤¢ãå 拉àëå
+ᢥà夥ঠ¢ - ‘˜€ ¨ ‘‘‘. „㬠«®áì, ¢®â ®®, áâ㯫¥¨¥ ¤ ¢®
+¨áª®¬®£® ¡¥§®¡« 箣® ¬¨à®¯®à浪 . ¥ âãâ-â® ¡ë«®. “£à®§ £«®¡ «ì®©
+拉ன ª®äà®â 樨 ¤¥©áâ¢¨â¥«ì® á¨§¨« áì. ® ¢§ ¬¥ ¡ë¢è¥£®
+ª®¬¬ã¨áâ¨ç¥áª®£® « £¥àï ¬¨à ¯®«ã稫 æ¥«ë© ó¡ãª¥âô ¯à®¡«¥¬ - ¨ ஦¤¥¨¥
+®¢ëå £®á㤠àáâ¢, ¨ ¯¥à¥á¬®âà £à ¨æ, ¨ ª®ä«¨ªâë ¯® ¯®¢®¤ã ¯à ¢
+ 欥ìè¨áâ¢, ¨ ª®¥æ, áà §ã ¤¢¥ ¢®©ë - «ª å ¨ Š ¢ª §¥. ’ ª®¢®
+¯àאַ¥ á«¥¤á⢨¥ ¯ ¤¥¨ï ‘‘‘, ¦¥«¥§®© å¢ âª®© ¯®¤ ¢«ï¢è¥£®, § £®ï¢è¥£®
+¢®¢ãâàì ¢á¥ ¯à®â¨¢®à¥ç¨ï ¢ãâà¨ á¥¡ï ¨ ¢ áä¥à¥ ᢮¥£® ¢«¨ï¨ï, ç⮠⥬
+á ¬ë¬ ãᨫ¨¢ «® ¬®éì ¨å ¯®â¥æ¨ «ì®£® ¢§àë¢ ¯®á«¥ ¢ë室 ¯®¢¥àå®áâì.
+ •Ž ‘Ž‚…’‘ŠŽƒŽ €‘€„€
+ „ ë© å®¤ ᮡë⨩ ¬®¦® ¡ë«® «¥£ª® ¯à®£®§¨à®¢ âì. ® ¬ «® ªâ® ¤ã¬ «,
+ª ª®¢® ¡ã¤¥â ¢«¨ï¨¥ ᮢ¥â᪮£® ªàãè¥¨ï ¢§ ¨¬®®â®è¥¨ï ¢ãâਠ§ ¯ ¤®£®
+á®®¡é¥á⢠. ‘¥£®¤ï 㦥 ®ç¥¢¨¤®, çâ® ‘®î§ ¡ë« ¥¬ «®¢ ¦ë¬ ä ªâ®à®¬
+ᯫ®ç¥¨ï í⮣® á®®¡é¥á⢠¨ à ᯠ¤ ᮢ¥â᪮£® £®á㤠àá⢠«áï ⮫窮¬,
+ª®â®àë© ãᨫ¨« ‡ ¯ ¤¥ æ¥â஡¥¦ë¥ ⥤¥æ¨¨, ¢ë« ¥á®¢¯ ¤¥¨¥
+¨â¥à¥á®¢ ¨¤ãáâਠ«ìëå áâà . 䮥 ⥤¥æ¨©, ¬¥â¨¢è¨åáï ¢ãâਠ…‘,
+¤ «ì¥©è ï áã¤ì¡ ¥¢à®¯¥©áª®© ¨â¥£à 樨 㦥 ¥ ¢ë£«ï¤¨â ¡¥§®¡« 箩.
+Š®¥ç®, ®¡êïáï¥âáï íâ® ¢ãâ२¬¨ ¯à®æ¥áá ¬¨ ¢ § ¯ ¤®¥¢à®¯¥©áª¨å áâà å.
+’®â ä ªâ, çâ® ¯à ªâ¨ç¥áª¨ ¯®¢áî¤ã ç «¨ ¢¤à㣠£®¢®à¨âì ¥ ®¡ ¨â¥£à 樨,
+ ® 樮 «ìëå ¨â¥à¥á å, âॡ®¢ âì ¥ à ᯠåãâì ®ª® ¢ ¬¨à, ®¯ãáâ¨âì
+èâ®àë, ¢® ¬®£®¬ ï¥âáï á«¥¤á⢨¥¬ ¯®¯à ¢«¥¨ï ®¡é¥á⢥®£® ¬¥¨ï,
+ ªâ¨¢¨¨§ 樨 樮 «¨áâ¨ç¥áª¨å £à㯯¨à®¢®ª, ¯®¢á¥¬¥á⮣® ãåã¤è¥¨ï
+íª®®¬¨ç¥áª®© á¨âã 樨.
+ ®, ¢ á¢®î ®ç¥à¥¤ì, ¢á¥ í⨠¯à®æ¥ááë ¯àאַ á¢ï§ ë á ¨§¬¥¥¨¥¬
+¯à¨¢ë箣® ®ªà㦥¨ï ‡ ¯ ¤®© …¢ யë. Ž ®ª § « áì «¨æ®¬ ª «¨æã á
+¥áâ ¡¨«ì묨 ¨ ¥¯à¥¤áª §ã¥¬ë¬¨ ¯®á⪮¬¬ã¨áâ¨ç¥áª¨¬¨ ®¡é¥á⢠¬¨. —¥¬
+¤ «ìè¥, ⥬ ¡®«ì訬 ¯®¤®§à¥¨¥¬ § ¯ ¤ë© ®¡ë¢ ⥫ì ᬮâà¨â ¢ ¨å áâ®à®ã,
+¥á«ãè ¢è¨áì ¯à®£®§®¢ ® £®â®¢ïé¨åáï § å«¥áâãâì …¢à®¯ã ¬ áᮢëå è¥á⢨ïå
+¬¨£à ⮢ ¨ ¯à®ç¨å ¥¯à¨ïâ®áâïå.
+ ‘ ¬ë¥ ªàã¯ë¥, à §ã¬¥¥âáï, ®¦¨¤ îâáï á® áâ®à®ë ¡ë¢è¥£® ‘®¢¥â᪮£®
+‘®î§ , ª®â®àë© ç é¥ ¢á¥£® ¢®á¯à¨¨¬ ¥âáï ª ª ¯®â¥æ¨ «ìë© ¨áâ®ç¨ª 拉àëå
+ª â áâà®ä ¨ ªà®¢ ¢ëå ¬¥¦ 樮 «ìëå ª®ä«¨ªâ®¢. ‚®â ¢ ¬ ¨ ¯®ç¢ ¤«ï ®¢ëå
+áâà 客; ¢®â ¨ ¨á⮪¨ ¢¥§ ¯®£® ª®á¥à¢ ⨢®£® ªà¥ § ¯ ¤®£® ®¡é¥á⢠,
+¥£® âïâ®â¥¨ï ª ¡®«¥¥ ¦¥á⪮¬ã ०¨¬ã, § ®¤® ¨ ª ®¢®¬ã à §¤¥«¨â¥«ì®¬ã
+§ ¢¥áã, ª®â®àë© ¡ë ®£à ¤¨« ¥£® ®â 襩 ç á⨠ᢥâ .
+ ਬ¥à ƒ¥à¬ ¨¨, à¥è¨¢è¥© ¢ ®â¢¥â ¯®£à®¬ë ¢ë¤¢®à¨âì § ᢮¨ ¯à¥¤¥«ë
+âëáïç¨ àã¬ë᪨å æë£ ¨ ¤ ¦¥ ¨§¬¥¨âì ª®áâ¨âãæ¨î á ⥬, çâ®¡ë ®£à ¨ç¨âì
+ç¨á«® ¯à¥â¥¤¥â®¢ ¯®«¨â¨ç¥áª®¥ ã¡¥¦¨é¥, ᢨ¤¥â¥«ìáâ¢ã¥â ® ⮬, çâ®
+¯à ¢ï騥 § ¯ ¤ë¥ ªà㣨 ¢ë㦤¥ë ॠ£¨à®¢ âì ®¢ë¥ áâà å¨. ‚®§¨ª ¥â
+¢®¯à®á: ¥ § áâ ¢ïâ «¨ í⨠áâà å¨ ¢ ãá«®¢¨ïå ¢®§¬®¦®£® ãåã¤è¥¨ï
+íª®®¬¨ç¥áª®£® ¯®«®¦¥¨ï ¡®«ìè¨á⢠¥¢à®¯¥©áª¨å £®á㤠àá⢠¯à®©â¨ ¨å
+ç¥à¥§ ¡®«¥§¥ë¥ ¨á¯ëâ ¨ï ¯à¨¢¥à¦¥®áâì ¨¤¥ï¬ ¤¥¬®ªà ⨨?
+ ‚ ¯à¨¢¥à¦¥®á⨠¥© ã ë¥è¨å ¯à ¢ïé¨å í«¨â ‡ ¯ ¤ ᮬ¥¨© ¥â.
+® ª ª¨¬ ¡ã¤¥â ®¢®¥ ¯®ª®«¥¨¥ ¯®«¨â¨ç¥áª¨å ¤¥ï⥫¥©, ¥ ¯®©¤ñâ «¨ ®®
+ ¯®¢®¤ã ã ¯®¯à ¢¥¢è¥© ç á⨠®¡é¥á⢠? ®ïâ®, çâ® íâ®â ¢®¯à®á ç é¥
+¢á¥£® ᮯ஢®¦¤ ¥âáï âॢ®¦ë¬ ¢§£«ï¤®¬ ¢ áâ®à®ã ƒ¥à¬ ¨¨, ¯à¥¢à é î饩áï
+ᥣ®¤ï ¢ ¤®¬¨¨àãî騩 ä ªâ®à ¥¢à®¯¥©áª®© áæ¥ë.
+ (®ª®ç ¨¥ á«¥¤ã¥â)
diff --git a/support/translit/example.alt.uu b/support/translit/example.alt.uu new file mode 100644 index 0000000000..c77206c8ca --- /dev/null +++ b/support/translit/example.alt.uu @@ -0,0 +1,164 @@ +Comment: This is a uuencoded file with the ALT characters. You need +Comment: a uudecode program (available on many archives) to obtain +Comment: an example.alt file + +begin 644 example.alt +M@""!(((@@R"$((4@\""&((<@B"")((H@BR",((T@CB"/() @D2"2(),@E""5 +M()8@ER"8()D@FB";()P@G2">()\@\PT*H""A(*(@HR"D(*4@\2"F(*<@J""I +M(*H@JR"L(*T@KB"O(. @X2#B(.,@Y"#E(.8@YR#H(.D@ZB#K(.P@[2#N(.\@ +M] T*(" @(" @(" @(" @(" @(" HJ*<@HZ"GI>+K(/.,KN&JKJ+AJJBE(*VN +MHJ[AXJCT+" V+C$R+CDR*0T*(" @(" @(" @(" @(" @(" @(" @(" @(" @ +M(" @((*;AXZ"(" @*.>@X>+L(*^EX**@[RD-"B @("""(*J@JJZI(.'CI>*E +M(*SK(.&EHZZDK>\@IJBB\:PN(""$H*:E(*^NJZCBJ*J@+""H(.*@(*2@HJVN +M(..FI0T*KZ7@I>'BH*N@(*V@X2"GH*VHK*#B["X@((SK(*ZAX*#IH*6L(*V@ +M(*VE\2"BK:BLH*VHI2#BKJOLJJX@XJZCI* L(*JNHZ2@#0JMH**EX.7C(."@ +MIZ.NX*"EXN'O(*[GI>"EI*V@[R#AHJ#@H"X@((VE(**NJZWC[N(@K:#A(*@@ +MK*C@KJ+KI2"OX*ZAJZ6LZRX-"I?BKB"F+""GH*>EK*OQK:VNX>+L(*V@Z*6C +MKB"AZ^*H[R"BKZZKK:4@KZZM[^*MH"X@(( @K*6FI.,@XJ6L(*_@KJCAY:ZD +M[^FEI0T*HJZJX..C(*2EJ>'BHJCBI:OLK:X@K^"HKJ'@I>*@I>(@HZNNH:"K +M[*WKI2"HIZREX*6MJ.\N#0H@(" @(" @(" @(" @(" @+BXN+BXN+BXN+BXN +M+BXN+BXN+BXN+BXN+BXN+BXN+BXN+@T*(" @(" @(" @(" @(" @(" @(" @ +MD9&1D""3C(60+B @BI*.((^.@86$B(L_#0H@(" @+BXNB.*@JBP@XJZK[*JN +M(.*EKZ7@[""MH.>HK:#NXB"BZ^"HX:ZBZZ*@XNSA[R"JKJWBX^#K(.*EY2"C +MX*"MI*BNIZWKY0T*KZ[AJZ6DX>*BJ*DL(*JNXJ[@ZZ4@X:+OIZ"MZR#A(*K@ +MH.6NK""JKJRLXZVHIZR@(*(@D:ZBI>+AJJZL()&N[J>E(*@@I:.N#0K@H.&O +MH*2NK"X@((7I\2"BYZ7@H""GH.#CH:6FK>NE(*"MH*NHXJBJJ"#A(*ZKJ*RO +MJ*GAJJBL(*&EX:_@J.'BX*#AXJBEK T*HJ>HX*"KJ""MH""AI:?@H.'AXZ2N +MYZWKI2"HIZ.HH>L@K:#HI:.N(*+KX.NBK:ZCKB"H(*VEKZZM[^*MKJ.N(*2B +MJ*:EK:CO+@T*D:6CKJ2M[R#CIJ4@K*VNHZBL(.'BH*VNHJCBX>\@[^&MKBP@ +MY^*N(.'CK*'CX*WKI2"JKJVBXZOLX:BH#0JOKN'BJJZLK..MJ.'BJ.>EX:JN +MHZX@K*C@H"#AH*SKK""MI:^NX>"EI.'BHJ6MK>NL(*ZAX*"GKJP@IZ#BX*"C +MJ**@[N(-"J2@J^RMI:GHX^X@X>.D[*'C(*+AI:.N(*REIJ3CK:#@KJ2MKJ.N +M(.&NKJ'II>'BHJ N(""$H"P@JJZLK..MJ*>L(.#CY:WCJRP-"I&1D9 @J.'G +MI:<@X2"OKJNHXJCGI>&JKJD@JJ#@XNLL(*VN(.*EK"#AH*SKK""AZZN@(*>@ +MHJ7@Z*6MH"#FI:N@[R"CJZ"BH T*HB"HX>*NX*BH(*+AI:D@YJBBJ*NHIZ#F +MJ*@N#0H@(" @C:4@XJZK[*JN(*V@X:NEI*VHJJ@@JJZLK..MJ*>LH"P@K:X@ +MJ""NX>*@J^RMKJD@K*C@(*ZJH*>@JZCA[""BI.#CHPT*KZ7@I:0@YZCAXNNL +M(*NHX>*NK"X@((^N(*REX*4@KN&NIZV@K:CO(.WBKJ.N(.2@JN*@(*(@IZ#@ +MXZ&EIJWKY0T*KZZKJ.*HYZ7AJJCE(*K@XZ.@Y2"OI>"BH.\@[:GDKN"H[R"O +MKJ&EI.L@K:"D(/.HK*^EX*BEJ2"GJZ#T(*@@K:6JKJ6CK@T*X:"LKN.DKJ*K +MI>*BKN"EK:CO(.&LI:WOI>+A[R"BX?$@H:ZK[.BEJ2"NIZ"AKN>EK:VNX>+L +M[BP@X*#AXJ7@[ZVMKN'B[.XL#0J@(*JNI2VCI*4@J""OH*VHJJZI+B @D*7G +M[""HI/'B(*VE(.*NJ^RJKB"N(.+@I:*NHZ4L(*+KIZ*@K:VNJ0T*K:6OX*6D +MX:J@I^.EK*[AXNSN(*_@KN:EX>&NHB"MH"#BI>#@J.*NX*BH(*+GI>"@Z*VE +MHZX@D9&1D"X@((KAXJ#BJ"P@KZZJH T*KJVH(*VE(*_@J*WOJZ@@X>*NJ^P@ +MH*^NJJ"KJ*_AJ.>EX:JNJ2#DKN"LZRP@JJ"J(*ZFJ*2@JZ@@K*VNHZBE+""H +M#0JOX*[BI:J@[N(@HB"NXJNHYZBE(*[B()ZCKN&KH**HJ""AKJNEI2#FJ**H +MJZBGKJ*@K:VN+@T*(" @((*DX..C(.$@KN>EHJBDK:[AXNSN(*[BJN#KJZ[A +M[""DX..CKJ4@+2#GXJXL(*VEX:RNXN#O(*V@(**MI>BMI0T*H*'AKJONXJWC +M[B"OX*[BJ**NKZZKKJ:MKN'B[""GH*^@I*VNJ2"H(*JNK*SCK:CAXJCGI>&J +MKJD@X:CAXJ6L+""NK:@-"J*GH*BLKN&B[Z>@K>LN("",I>6@K:BGK"#@H*>B +MJ.*H[R#BKJD@J""DX..CKJDL(*J@JB#BI:^EX.P@KJ&MH.#CIJBBH*7BX>\L +M#0JAZZL@IZ"OX*ZCX*"LK*C@KJ*@K2"MH""MH*NHYZBE(.&BKJ6CKB"@K>*@ +MHZZMJ.'BH"X-"B @(""%Z?$@K^"EI.'BKJCB(."@IZZAX*#B[.'O+""B(*J@ +MJJZI(.'BI:^EK:@@XJ4@J*NH(*BMZZ4@XJ6MI*6MYJBH#0JNH>FEX>*BI:VM +MKJD@IJBGK:@@AZ"OH*2@(.^BJ*NHX>P@X*6GXZOLXJ#BKJP@I:.N(**MX^+@ +MI:VMZZD@[:*NJ^[FJ*@L(* -"J(@JJ"JKJD@H>NKJ""NH>/AJZZBJZ6MZR#A +MX^FEX>*BKJ*@K:BEK""JKJRLXZVHX>*HYZ7AJJZCKB"NH>FEX>*BH"P@J T* +MK:"NH:[@KN(N(""-KB"GH*^@I*WKJ2"LJ. L(.*@JB"DKJNCKB"H(*"JXJBB +MK:X@I*ZAJ**@HNBHJ>'O(*JNK>:@#0JJKJRLXZVHIZR@+""NJJ"GH*OA[R"M +MI2"OKJ2CKN*NHJNEK:WKK""J(*:HIZVH(*^NX:NE(*6CKB"OH*2EK:CO+B @ +MCJVN#0JMH.#CZ*BKKB"CJZZAH*OLK>/N(.&HX>*EK.,@H:6GKJ^@X:VNX>*H +M(*@@KJ'II::HXJCO+""JKN*NX*#O(.&JX..OXZOQIZVN#0KAKJ>DH**@JZ#A +M[""OKN&KI2"BXJ[@KJD@K*C@KJ*NJ2"BKJFMZRP@X^&OI:N@(*ZAX*#AXJ@@ +MX:*NI:D@H>[@KJK@H.*HI:D@J T*KZZKX^>HXNP@I*"FI2#AKJ'AXJ*EK:WC +M[B"KKJ.HJN,@X*"GHJCBJ.\N("" (.+CXB"B(*ZDK:X@K*.MKJ*EK:BE(.WB +MKN(-"JRHX*ZOKN#OI*ZJ(."@IZ*@JZBKX>\N#0H@(" @@JREX>*E(.$@K:BL +M(*^NJJ#GK>.KH.'L(*+A[R#@H*>BI>*BJ_&MK:#O(.&HX>*EK* @J*WAXJCB +MX^*NHB"H#0KFI:VMKN'BI:DL(*V@(*JNXJ[@Z^4@I*X@X:CE(*^NX""DI>"F +MH*NNX>P@Y>#CKZJNI2"LJ."NHJZE(."@HJVNHJ7AJ*4N#0J1XJ"KKB#OX:VN +M+"#GXJX@K:4@XJZK[*JN(*'KHNBHK""JKJRLXZVHX>*HYZ7AJJBL(*.NX>.D +MH.#AXJ*@K"P@K:X@J T*HN&EK.,@K*C@KJ*NK.,@X:ZNH>FEX>*BXR"OX*6D +MX>*NJ.(@J.&JH.+L(*VNHNNE(.2NX*SK(.'CZ:7AXJ*NHJ"MJ.\N#0J/X*BD +M\>+A[R"GH*VNHJX@KN&LZ^&KJ**@XNP@K*VNHZBE(**NK^"NX>LL(*J@IZ"B +MZ*BEX>\@X*"G(*@@K:"BX:6CI* -"N"EZ/&MK>NLJ"X@()&JH*:EK"P@X>*@ +MH:BK[*VNX>+L(*/@H*VHYB"HJZ@@KJ&EX:^EYZ6MJ*4@YJ6KKN'BK:[AXJ@- +M"J.NX>.DH.#AXJ(N("" (*_@H**@(*V@YJBI(*V@(.&@K*ZNK^"EI*6KI:VH +MI2P@K:ZBZZD@Y*6DI>"@JZBGK""H#0KAKN>EXJ"MJ*4@JN"HXJ7@J*6B(*V@ +MYJBNK:"K[*VNHZX@HJZGX*ZFI*6MJ.\@J""DI:RNJN"@XJBH/R @D:6CKJ2M +M[R#MXJ@-"J*NK^"NX>L@KZZDK>_BZR"OKN'BJJZLK..MJ.'BJ.>EX:JHK*@@ +MKJ'II>'BHJ"LJ"X@((VN(**NXBVBKN(@JB"MJ*P@HJVNHNP-"J*NIZ+@H.+O +MXN'O("CCIJ4@HJZGHN"@Z:#NXN'O*2"CKN'CI*#@X>*BH"" IZBH(*@@@.3@ +MJ*JH+""CI*4-"N&NKN*BI>+AXJ+C[NFHI2"OX*[FI>'AZR"AZZNH(*(@X:*N +M\2"BX*6L[R"HX:KCX>'BHJ6MK:X@IZ"LKN"NIJ6MZRX-"B @(""/X*CEKJ2H +MXN'O(*_@I:ZDKJNEHJ#B[""H(*V@Z*@@K:6DH**MJ*4@J*NK[J>HJ"X@()&J +MKJOLJJX@H>NKK@T*HJ[AXJ[@HZZB(*^N(*^NHJZDXR#@H.&OH*2@(*&HKZZK +M[ZVNJ2#AJ.'BI:SK(*REIJ3C(*V@X*ZDK>OE(*[BK:[HI:VHJ2P-"J^NJJZH +MHNBEJ>'O(*V@(.&NKZ7@K:CGI>'BHJ4@J""BIZ"HK*VNK"#AI*7@IJBBH*VH +MJ""DHN/E(.^DI>"MZ^4-"N&BI>#EI*7@IJ"B("T@D9B (*@@D9&1D"X@((3C +MK*"KKN'L+""BKN(@KJVN+""MH.'BXZ^KI:VHI2"DH**MK@T*J.&JKJRNHZX@ +MH:6GKJ&KH.>MKJ.N(*RHX*ZOKN#OI*J@+B @C:4@XN/B+>*N(*'KJZXN(""3 +MH^"NIZ @HZNNH:"K[*VNJ0T*[Z2EX*VNJ2"JKJWDX*ZMXJ#FJ*@@I*6IX>*B +MJ.*EJ^RMKB#AK:BGJ*N@X>PN(""-KB"BIZ"LI:T@H>NBZ*6CK@T*JJZLK..M +MJ.'BJ.>EX:JNHZX@JZ"CI>#O(*RHX""OKJOCYZBK(.:EJ^NI(/.AXZJEXO0@ +MK^"NH:NEK" M(*@@X*ZFI*6MJ*4-"JVNHNOE(*.NX>.DH.#AXJ(L(*@@KZ7@ +MI>&LKN+@(*/@H*VHYBP@J""JKJWDJZBJXNL@KZX@KZZBKJ3C(*_@H*(-"JV@ +MYJREK>SHJ*WAXJ(L(*@@K:"JKJVEYBP@X>"@I^,@I**E(**NJ:WK("T@K: @ +M@:"KJJ"MH.4@J""*H**JH*>E+B @DJ"JKJ*N#0JOX.^LKJ4@X:NEI.'BHJBE +M(*^@I*6MJ.\@D9&1D"P@IJ6KI:>MKJD@Y:*@XJJNJ2"OKJ2@HJOOHNBEHZXL +M(*>@HZZM[Z+HI:.N#0JBKJ*MX^+@[""BX:4@K^"NXJBBKN"EYZCO(**MX^+@ +MJ"#AI:'O(*@@HB#AY*7@I2#AHJZEHZX@HJNH[ZVH[RP@Y^*N(.*EK T*X:"L +MZZP@X^&HJZBBH*NN(*RNZ>P@J.4@KZ[BI:WFJ*"K[*VNHZX@HJ?@ZZ*@(*^N +MX:NE(*+KY:ZDH""MH""OKJ*EX.6MKN'B["X-"B @(" @(" @(" @(" @(" @ +M(" @G96.()&.@H62D8J.@XX@D("1CX"$@ T*(" @((2@K:WKJ2#EKJ0@X:ZA +MZ^*HJ2"LKJ:MKB"AZZNN(*NEHZJN(*_@KJ.MKJ>HX*ZBH.+L+B @C:X@K*"K +MKB"JXJX@I..LH*LL#0JJH*JNHJX@H>.DI>(@HJNH[ZVHI2#AKJ*EXN&JKJ.N +M(*K@X^BEK:CO(*V@(**GH*BLKJ[BK:[HI:VH[R"BK>/BX*@@IZ"OH*2MKJ.N +M#0KAKJZAZ:7AXJ*@+B @D:6CKJ2M[R#CIJ4@KN>EHJBDK:XL(.?BKB"1KNZG +M(*'KJR"MI:R@JZZBH*:MZZP@Y*"JXJ[@KJP-"N&OJZ[GI:VH[R#MXJZCKB#A +MKJZAZ:7AXJ*@(*@@X*#AKZ"D(.&NHJ7BX:JNHZX@HZ[AXZ2@X.'BHJ @[Z*H +MJ^'O(.*NJ^>JKJPL#0JJKN*NX.NI(./AJ*NHJR"MH""'H*^@I*4@YJ6MXN"N +MH:6FK>NE(.*EK:2EK>:HJ"P@HNOOHJBK(*VEX:ZBKZ"DI:VHI0T*J*WBI>"E +MX:ZB(*BMI./AXN"HH*OLK>OE(.'BX*"M+B @C: @Y*ZMI2#BI:VDI:WFJ*DL +M(*V@K*7BJ*+HJ.7A[R"BK>/BX*@@A9$L#0JDH*OLK:6IZ*#O(.'CI.RAH""E +MHN"NKZ6IX:JNJ2"HK>*EH^"@YJBH(..FI2"MI2"BZZ.K[Z2HXB"AI:>NH:N@ +MYZVNJ2X-"HJNK:7GK:XL(*ZAZN_AK>^EXN'O(.WBKB"BK>/BX*6MK:BLJ""O +MX*[FI>'AH*RH(*(@IZ"OH*2MKJ6BX*ZOI:GAJJCE(.'BX*"MH.4N#0J2KN(@ +MY*"JXBP@Y^*N(*_@H*KBJ.>EX:JH(*^NHN'NI.,@K:#GH*NH(**DX..C(*.N +MHJ[@J.+L(*VE(*ZA(*BMXJ6CX*#FJ*@L#0J@(*X@K:#FJ*ZMH*OLK>OE(*BM +MXJ7@I>&@Y2P@XN"EH:ZBH.+L(*VE(."@X:^@Y:WCXNP@KJJMKB"B(*RHX"P@ +MH""NK^/AXJCB[ T*Z.*NX.LL(**N(*RMKJ.NK"#OHJOOI>+A[R#AJZ6DX>*B +MJ*6L(*^NK^"@HJNEK:CO(*ZAZ:7AXJ*EK:VNHZX@K*VEK:CO+ T*H*KBJ**H +MJ*>@YJBH(*V@YJBNK:"KJ.'BJ.>EX:JHY2"CX..OKZC@KJ*NJBP@KZZBX:6L +MI>'BK:ZCKB#CY>.DZ*6MJ.\-"NVJKJVNK*CGI>&JKJD@X:CBXZ#FJ*@N#0H@ +M(" @C:XL(*(@X:*N[B"NYZ7@I:3L+""BX:4@[>*H(*_@KN:EX>'K(*_@[ZRN +M(.&B[Z>@K>L@X2"HIZREK:6MJ*6L#0JOX*BBZ^>MKJ.N(*ZJX..FI:VH[R"' +MH*^@I*VNJ2"%HJ#@KJ_K+B @CJV@(*ZJH*>@JZ#A[""KJ.:NK""J(*NHYN,@ +MX0T*K:7AXJ"AJ*OLK>NLJ""H(*VEK^"EI.&JH*?CI:SKK*@@KZ[AXJJNK*SC +MK:CAXJCGI>&JJ*RH(*ZAZ:7AXJ*@K*@N(""7I:P-"J2@J^SHI2P@XJ6L(*&N +MJ^SHJ*P@KZZDKJ?@I:VHI:P@IZ"OH*2MZZD@KJ'KHJ#BI:OL(.&LKN+@J.(@ +MHB"HY2#AXJ[@KJWC+ T*K:7AJ^/HH*+HJ.'L(*_@KJ.MKJ>NHB"N(*.NXJZB +M[^FHY>'O(*>@Y:NEX>*MX^+L((6BX*ZOXR"LH.'AKJ+KY2"MH.BEX>*BJ._E +M#0JLJ*/@H*WBKJ(@J""OX*[GJ.4@K:6OX*COXJVNX>+OY2X-"B @(""1H*SK +MI2"JX..OK>NE+"#@H*?CK*6EXN'O+""NIJBDH.[BX>\@X:X@X>*NX*ZMZR"A +MZZ+HI:.N()&NHJ7BX:JNHZX-"I&N[J>@+""JKN*NX.NI(.>@Z:4@HN&EHZX@ +MHJ[AK^"HK:BLH*7BX>\@JJ"J(*^NXJ6MYJB@J^RMZZD@J.'BKN>MJ*H@[Z2E +MX*WKY0T*JJ#BH.'BX*[D(*@@JN"NHJ"BZ^4@K*6FK:#FJ*ZMH*OLK>OE(*JN +MK>2KJ*KBKJ(N("""KN(@HJ"L(*@@KZ[GHJ @I*OO(*VNHNOE#0KAXN"@Y:ZB +M.R"BKN(@J""HX>*NJJ@@HJVEIZ"OK:ZCKB"JKJWAI>"BH.*HHJVNHZX@JN"E +MK: @IZ"OH*2MKJ.N(*ZAZ:7AXJ*@+ T*I:.N(.+OXJ[BI:VH[R"J(*&NJZ6E +M(*:EX>*JKJSC(."EIJBLXRP@H""GH*ZDK:X@J""J(*VNHJZLXR#@H*>DI:NH +MXJ6K[*VNK.,-"J>@K:"BI>'C+""JKN*NX.NI(*'K(*ZCX*"DJ*L@I:.N(*[B +M(*V@Z*6I(.>@X>*H(.&BI>*@+@T*(" @((_@J*REX""#I>"LH*VHJ"P@X*7H +MJ*+HI:D@HB"NXJ*EXB"MH""OKJ/@KJSK(*+KI**NX*CB[""GH"#AHJZH(*_@ +MI:2EJ^L-"N+KX>_GJ"#@XZSKK>&JJ.4@YNNCH*T@J""DH*:E(*BGK*6MJ.+L +M(*JNK>'BJ.+CYJCN(.$@XJ6L+"#GXJZAZR"NH^"@K:CGJ.+L#0KGJ.&KKB"O +MX*7BI:VDI:WBKJ(@K: @KZZKJ.*HYZ7AJJZE(..AI::HZ:4L(.&BJ*2EXJ6K +M[.'BHN.EXB"N(.*NK"P@Y^*N#0JOX*"B[^FHI2"GH*^@I*WKI2"JX..CJ""B +MZZWCIJ2EK>L@X*6@HZC@KJ*@XNP@K: @K:ZBZZ4@X>+@H.6H+B @@JZGK:BJ +MH*7B#0JBKJ_@KN$Z(* @K:4@IZ#AXJ"B[^(@JZ@@[>*H(.'BX*#EJ""B(./A +MJZZBJ._E(**NIZRNIJVNHZX@X^7CI.BEK:CO#0KMJJZMKJRHYZ7AJJZCKB"O +MKJNNIJ6MJ.\@H:ZK[.BHK>'BHJ @I:+@KJ^EJ>&JJ.4@HZ[AXZ2@X.'BHB"O +MX*ZIXJ@@J.4-"N>EX*6G(*&NJZ6GK:6MK>NE(*CAK^OBH*VH[R"MH""OX*BB +MI>"FI:VMKN'B[""HI*7OK""DI:RNJN"@XJBH/PT*(" @(((@K^"HHJ7@IJ6M +MK:[AXJ@@I:D@XR"MZZVEZ*VHY2"OX*"B[^FHY2#MJZCB((>@KZ"DH"#AKJRM +MI:VHJ2"MI>(N#0J-KB"JH*JHK""AXZ2EXB"MKJ*NI2"OKJJNJZ6MJ*4@KZZK +MJ.*HYZ7AJJCE(*2E[^*EJZ6I+""MI2"OKJFD\>(@JZ@@KJVN#0JMH""OKJ*N +MI.,@XR"OKJ_@H**EHNBEJ2#GH.'BJ""NH>FEX>*BH#\@((^NK>_BK:XL(.?B +MKB#MXJ[B(**NK^"NX2#GH.FE#0JBX:6CKB#AKJ_@KJ*NIJ2@I>+A[R#BX*6B +MKJ:MZZP@HJ>CJ^^DKJP@HB#AXJ[@KJWC((.EX*R@K:BH+""OX*6BX*#IH.[I +MI:GA[PT*X:6CKJ2M[R"B(*2NK*BMJ.#C[NFHJ2#DH*KBKN @I:+@KJ^EJ>&J +MKJD@X>:EK>LN#0H@(" @(" @(" @(" @(" @(" @(" @**ZJKJWGH*VHI2#A +)JZ6DXZ7B*0T* + +end diff --git a/support/translit/example.ko8.uu b/support/translit/example.ko8.uu new file mode 100644 index 0000000000..1ef99f8b4d --- /dev/null +++ b/support/translit/example.ko8.uu @@ -0,0 +1,164 @@ +Comment: This is a uuencoded file with the KOI8 characters. You need +Comment: a uudecode program (available on many archives) to obtain +Comment: an example.ko8 file + +begin 644 example.ko8 +MX2#B(/<@YR#D(.4@LR#V(/H@Z2#J(.L@["#M(.X@[R#P(/(@\R#T(/4@YB#H +M(.,@_B#[(/T@_R#Y(/@@_"#@(/$@\PT*P2#"(-<@QR#$(,4@HR#6(-H@R2#* +M(,L@S"#-(,X@SR#0(-(@TR#4(-4@QB#((,,@WB#;(-T@WR#9(-@@W"# (-$@ +M] T*(" @(" @(" @(" @(" @(" HR=H@Q\':Q=39(//MS]/+S]?3R\G%(,[/ +MU\_3U,GT+" V+C$R+CDR*0T*(" @(" @(" @(" @(" @(" @(" @(" @(" @ +M(" @(/?Y^N_W(" @*-[!T]38(-#%TM?!T2D-"B @("#W(,O!R\_*(-/5Q=3% +M(,W9(-/%Q\_$SM$@ULG7H\TN("#DP=;%(-#/S,G4R<O!+"#)(-3!(,3!U\[/ +M(-76Q0T*T,72Q=/4P<S!(,[!TR#:P<[)S<'4V"X@(.W9(,_"TL'=P<7-(,[! +M(,[%HR#7SLG-P<[)Q2#4S\S8R\\@U,_'Q,$L(,O/Q\3!#0K.P=?%TLC5(-+! +MVL?/TL'%U-/1(,_>Q=+%Q,[!T2#3U\'2P2X@(.[%(-?/S,[5P-0@SL'3(,D@ +MS<G2S]?9Q2#0TL_"S,7-V2X-"O[4SR#6+"#:P=K%S<RCSL[/T]38(,[!V\7' +MSR#"V=3)T2#7T,_,SL4@T,_.T=3.P2X@(.$@S<76Q-4@U,7-(-#2S\G3R,_$ +MT=W%Q0T*U\_+TM7'(,3%RM/4U\G4Q<S8SL\@T-+)S\+2Q=3!Q=0@Q\S/PL', +MV,[9Q2#)VLW%TL7.R=$N#0H@(" @(" @(" @(" @(" @+BXN+BXN+BXN+BXN +M+BXN+BXN+BXN+BXN+BXN+BXN+BXN+@T*(" @(" @(" @(" @(" @(" @(" @ +M\_/S\B#U[>7R+B @Z_3O(/#OXN7DZ>P_#0H@(" @+BXNZ=3!RRP@U,_,V,O/ +M(-3%T,72V"#.P=[)SL' U"#7V=+)T\_7V=?!U-C3T2#+S\[4U=+9(-3%R"#' +MTL'.Q,G/VL[9R T*T,_3S,7$T]37R<HL(,O/U,_2V<4@T]?1VL'.V2#3(,O2 +MP<C/S2#+S\W-U<[)VLW!(-<@\\_7Q=33R\_-(///P-K%(,D@Q<?/#0K2P=/0 +MP<3/S2X@(.7=HR#7WL72P2#:P=+5PL76SMG%(,'.P<S)U,G+R2#3(,_,R<W0 +MR<K3R\G-(,+%T]#2R=/4TL'3U,G%S0T*U]K)TL',R2#.P2#"Q=K2P=/3U<3/ +MWL[9Q2#)VL?)PMD@SL';Q<?/(-?9TMG7SL_'SR#)(,[%T,_.T=3.S\?/(,37 +MR=;%SLG1+@T*\\7'S\3.T2#5UL4@S<[/Q\G-(-/4P<[/U\G4T]$@T=/.SRP@ +MWM3/(-/5S<+5TL[9Q2#+S\[7U<S8T\G)#0K0S]/4R\_-S=7.R=/4R=[%T\O/ +MQ\\@S<G2P2#3P<W9S2#.Q=#/T]+%Q-/4U\7.SMG-(,_"TL':S\T@VL'4TL'' +MR=?!P-0-"L3!S-C.Q<K;U< @T]7$V,+5(-?3Q<?/(,W%UL35SL'2S\3.S\?/ +M(-//S\+=Q=/4U\$N("#DP2P@R\_-S=7.R=K-(-+5R,[5S"P-"O/S\_(@R=/> +MQ=H@TR#0S\S)U,G>Q=/+S\H@R\'2U-DL(,[/(-3%S2#3P<W9S2#"V<S!(-K! +MU\72V\7.P2##Q<S!T2#'S,'7P0T*UR#)T]3/TLG)(-?3Q<H@P\G7R<S)VL'# +MR<DN#0H@(" @[L4@U,_,V,O/(,[!T\S%Q,[)R\D@R\_-S=7.R=K-P2P@SL\@ +MR2#/T]3!S-C.S\H@S<G2(,_+P=K!S,G3V"#7Q-+5QPT*T,72Q<0@WLG3U-G- +M(,S)T]3/S2X@(/#/(,W%TL4@S]//VL[!SLG1(-S4S\?/(,;!R]3!(-<@VL'2 +MU<+%UL[9R T*T,_,R=3)WL73R\G((,O2U<?!R"#0Q=+7P=$@W,K&S]+)T2#0 +MS\+%Q-D@SL'$(//)S=#%TLG%RB#:S,'T(,D@SL7+S\7'SPT*T\'-S]7$S]?, +MQ=37S]+%SLG1(-/-Q<[1Q=33T2#7TZ,@PL_,V-O%RB#/VL'"S][%SL[/T]38 +MP"P@TL'3U,72T<[.S]/4V, L#0K!(,O/Q2W'Q,4@R2#0P<[)R\_*+B @\L7> +MV"#)Q*/4(,[%(-3/S-C+SR#/(-32Q=?/Q\4L(-?9VM?!SL[/R@T*SL70TL7$ +MT\O!VM7%S<_3U-C (-#2S\/%T]//UR#.P2#4Q=+2R=3/TLG)(-?>Q=+!V\[% +MQ\\@\_/S\BX@(.O3U,'4R2P@T,_+P0T*S\[)(,[%(-#2R<[1S,D@T]3/S-@@ +MP=#/R\',R=#3R=[%T\O/RB#&S]+-V2P@R\'+(,_6R<3!S,D@S<[/Q\G%+"#) +M#0K0TL_4Q<O!P-0@UR#/U,S)WLG%(,_4(.#'S]/,P=?)R2#"S\S%Q2##R=?) +MS,G:S]?!SL[/+@T*(" @(/?$TM7'(-,@S][%U\G$SL_3U-C (,_4R]+9S,_3 +MV"#$TM7'S\4@+2#>U,\L(,[%T\W/U-+1(,[!(-?.Q=O.Q0T*P<+3S\S U,[5 +MP"#0TL_4R=?/T,_,S];.S]/4V"#:P=#!Q,[/RB#)(,O/S<W5SLG3U,G>Q=/+ +MS\H@T\G3U,7-+"#/SLD-"M?:P<G-S]/7T=K!SMDN("#MQ<C!SLG:S2#2P=K7 +MR=3)T2#4S\H@R2#$TM7'S\HL(,O!RR#4Q=#%TM@@S\+.P=+5ULG7P<74T]$L +M#0K"V<P@VL'0TL_'TL'-S<G2S]?!SB#.P2#.P<S)WLG%(-/7S\7'SR#!SM3! +MQ\_.R=/4P2X-"B @("#EW:,@T-+%Q-/4S\G4(-+!VL_"TL'4V-/1+"#7(,O! +MR\_*(-/4Q=#%SLD@U,4@R<S)(,G.V<4@U,7.Q,7.P\G)#0K/PMW%T]37Q<[. +MS\H@ULG:SLD@^L'0P<3!(-'7R<S)T]@@TL7:U<S8U,'4S\T@Q<?/(-?.U=32 +MQ<[.V<H@W-?/S,##R<DL(,$-"M<@R\'+S\H@PMG,R2#/PM73S,_7S,7.V2#3 +MU=W%T]37S]?!SLG%S2#+S\W-U<[)T]3)WL73R\_'SR#/PMW%T]37P2P@R0T* +MSL'/PL_2S]0N("#NSR#:P=#!Q,[9RB#-R=(L(-3!RR#$S\S'SR#)(,'+U,G7 +MSL\@Q,_"R=?!U]O)RM/1(,O/SL/!#0K+S\W-U<[)VLW!+"#/R\':P<S3T2#. +MQ2#0S\3'S]3/U\S%SL[9S2#+(-;)VL[)(-#/T\S%(,7'SR#0P<3%SLG1+B @ +M[\[/#0K.P=+5V\G,SR#'S,_"P<S8SM7 (-/)T]3%S=4@PL7:S]#!T\[/T]3) +M(,D@S\+=Q=;)U,G1+"#+S]3/TL'1(-/+TM70U<RCVL[/#0K3S]K$P=?!S,'3 +MV"#0S]/,Q2#7U,_2S\H@S<G2S]?/RB#7S\K.V2P@U=/0Q<S!(,_"TL'3U,D@ +MT]?/Q<H@PL#2S\O2P=3)Q<H@R0T*T,_,U=[)U-@@Q,'6Q2#3S\+3U-?%SL[5 +MP"#,S\?)R]4@TL':U\G4R=$N("#A(-35U"#7(,_$SL\@S<?.S]?%SLG%(-S4 +MS]0-"LW)TL_0S]+1Q,_+(-+!VM?!S,G,T]$N#0H@(" @]\W%T]3%(-,@SLG- +M(-#/R\'>SM7,P=/8(-?3T2#2P=K7Q=37S*/.SL'1(-/)T]3%S<$@R<[3U,G4 +MU=3/UR#)#0K#Q<[.S]/4Q<HL(,[!(,O/U,_2V<@@Q,\@T\G((-#/TB#$Q=+6 +MP<S/T]@@R-+5T,O/Q2#-R=+/U\_%(-+!U\[/U\73R<4N#0KSU,',SR#1T\[/ +M+"#>U,\@SL4@U,_,V,O/(,+9U]O)S2#+S\W-U<[)T]3)WL73R\G-(,?/T]7$ +MP=+3U-?!S2P@SL\@R0T*U]/%S=4@S<G2S]?/S=4@T\_/PMW%T]37U2#0TL7$ +MT]3/R=0@R=/+P=38(,[/U]G%(,;/TLW9(-/5W<73U-?/U\'.R=$N#0KPTLG$ +MH]33T2#:P<[/U\\@S]/-V=/,R=?!U-@@S<[/Q\G%(-?/T-+/T]DL(,O!VL'7 +MV\G%T]$@TL':(,D@SL'7T\7'Q,$-"M+%VZ/.SMG-R2X@(//+P=;%S2P@T]3! +MPLG,V,[/T]38(,?2P<[)PR#)S,D@S\+%T]#%WL7.R<4@P\7,S]/4SL_3U,D- +M"L?/T]7$P=+3U-<N("#A(-#2P=?!(,[!P\G*(,[!(-/!S<_/T-+%Q,7,Q<[) +MQ2P@SL_7V<H@QL7$Q=+!S,G:S2#)#0K3S][%U,'.R<4@R]+)U,72R<77(,[! +MP\G/SL',V,[/Q\\@U\_:TL_6Q,7.R=$@R2#$Q<W/R]+!U,G)/R @\\7'S\3. +MT2#<U,D-"M?/T-+/T]D@T,_$SM'4V2#0S]/4R\_-S=7.R=/4R=[%T\O)S<D@ +MS\+=Q=/4U\'-R2X@(.[/(-?/U"W7S]0@RR#.R<T@U\[/U]@-"M?/VM?2P=31 +MU-/1("C5UL4@U\_:U]+!W<' U-/1*2#'S]/5Q,'2T]37P2#AVLG)(,D@X<;2 +MR<O)+"#'Q,4-"M//S]37Q=33U-?5P-W)Q2#0TL_#Q=/3V2#"V<S)(-<@T]?/ +MHR#7TL7-T2#)T\O5T]/4U\7.SL\@VL'-S]+/UL7.V2X-"B @("#PTLG(S\3) +MU-/1(-#2Q<_$S\S%U\'4V"#)(,[!V\D@SL7$P=?.R<4@R<S,P-K)R2X@(//+ +MS\S8R\\@PMG,SPT*U\_3U,_2Q\_7(-#/(-#/U\_$U2#2P=/0P<3!(,+)T,_, +MT<[/RB#3R=/4Q<W9(,W%UL35(,[!TL_$SMG((,_4SL_;Q<[)RBP-"M#/R\_) +MU]O%RM/1(,[!(-//T,72SLG>Q=/4U\4@R2#7VL')S<[/S2#3Q,72ULG7P<[) +MR2#$U]7((-'$Q=+.V<@-"M/7Q=+(Q,72UL'7("T@\_OA(,D@\_/S\BX@(.35 +MS<',S]/8+"#7S]0@S\[/+"#.P=/4U=#,Q<[)Q2#$P=?.SPT*R=/+S\W/Q\\@ +MPL7:S\+,P=[.S\?/(,W)TL_0S]+1Q,O!+B @[L4@U-74+=3/(,+9S,\N("#U +MQ]+/VL$@Q\S/PL',V,[/R@T*T<3%TL[/RB#+S\[&TL_.U,'#R<D@Q,7*T]37 +MR=3%S-C.SR#3SLG:R<S!T]@N("#NSR#7VL'-Q<X@PMG7V\7'SPT*R\_-S=7. +MR=/4R=[%T\O/Q\\@S,''Q=+1(,W)TB#0S\S5WLG,(,/%S-G*(//"U<O%U/0@ +MT-+/PLS%S2 M(,D@TL_6Q,7.R<4-"L[/U]G((,?/T]7$P=+3U-<L(,D@T,72 +MQ=/-S]32(,?2P<[)PRP@R2#+S\[&S,G+U-D@T,\@T,_7S\35(-#2P=<-"L[! +MP\W%SMC;R<[3U-<L(,D@SL'+S\[%PRP@T]+!VM4@Q-?%(-?/RL[9("T@SL$@ +MXL',R\'.P<@@R2#KP=?+P=K%+B @],'+S]?/#0K0TM'-S\4@T\S%Q-/4U\G% +M(-#!Q,7.R=$@\_/S\BP@UL7,Q=K.S\H@R-?!U,O/RB#0S\3!U\S1U]O%Q\\L +M(-K!Q\_.T=?;Q<?/#0K7S]?.U=32V"#7T\4@T-+/U,G7S]+%WLG1(-?.U=32 +MR2#3Q<+1(,D@UR#3QL72Q2#3U\_%Q\\@U\S)T<[)T2P@WM3/(-3%S0T*T\'- +MV<T@U=/)S,G7P<S/(,W/W=@@R<@@T,_4Q<[#R<',V,[/Q\\@U]K2V=?!(-#/ +MT\S%(-?9R,_$P2#.P2#0S]?%TLC.S]/4V"X-"B @(" @(" @(" @(" @(" @ +M(" @_.CO(//O]^7T\^OOY^\@\N'S\.'DX0T*(" @(.3!SL[9RB#(S\0@T\_" +MV=3)RB#-S];.SR#"V<S/(,S%Q\O/(-#2S\?.S]K)TL_7P=38+B @[L\@S<', +MSR#+U,\@Q-7-P<PL#0K+P<O/U\\@PM7$Q=0@U\S)T<[)Q2#3S]?%U-/+S\?/ +M(,O2U=O%SLG1(,[!(-?:P<G-S\_4SL_;Q<[)T2#7SM74TLD@VL'0P<3.S\?/ +M#0K3S\_"W<73U-?!+B @\\7'S\3.T2#5UL4@S][%U\G$SL\L(-[4SR#SS\#: +M(,+9S"#.Q<W!S,_7P=;.V<T@QL'+U,_2S\T-"M/0S,_>Q<[)T2#<U,_'SR#3 +MS\_"W<73U-?!(,D@TL'3T,'$(-//U\74T\O/Q\\@Q\_3U<3!TM/4U\$@T=?) +MS-/1(-3/S-[+S\TL#0K+S]3/TMG*(-73R<S)S"#.P2#ZP=#!Q,4@P\7.U-+/ +MPL76SMG%(-3%SL3%SL/)R2P@U]G1U\G,(,[%T\_7T,'$Q<[)Q0T*R<[4Q=+% +MT\_7(,G.Q-73U-+)P<S8SMG((-/4TL'.+B @[L$@QL_.Q2#4Q<[$Q<[#R<HL +M(,[!S<74R=?;R<C3T2#7SM74TLD@Y?,L#0K$P<S8SL7*V\'1(-/5Q-C"P2#% +MU]+/T,7*T\O/RB#)SM3%Q]+!P\G)(-76Q2#.Q2#7V<?,T<3)U"#"Q=K/PLS! +MWL[/RBX-"NO/SL7>SL\L(,_"W]'3SM'%U-/1(-S4SR#7SM74TL7.SLG-R2#0 +MTL_#Q=/3P<W)(-<@VL'0P<3.S\77TL_0Q<K3R\G((-/4TL'.P<@N#0KTS]0@ +MQL'+U"P@WM3/(-#2P<O4R=[%T\O)(-#/U]/ Q-4@SL'>P<S)(-?$TM7'(,?/ +MU\_2R=38(,[%(,_"(,G.U,7'TL'#R<DL#0K!(,\@SL'#R<_.P<S8SMG((,G. +MU,72Q=/!R"P@U-+%PL_7P=38(,[%(-+!T]#!R,[5U-@@S\O.SR#7(,W)TBP@ +MP2#/T-73U,G4V T*V]3/TMDL(-?/(,W.S\?/S2#1U\S1Q=33T2#3S,7$T]37 +MR<7-(-#/T-+!U\S%SLG1(,_"W<73U-?%SL[/Q\\@S<[%SLG1+ T*P<O4R=?) +MR=K!P\G)(,[!P\G/SL',R=/4R=[%T\O)R"#'TM70T,G2S]?/RRP@T,_7T\7- +MQ=/4SL_'SR#5R-7$V\7.R=$-"MS+S\[/S<G>Q=/+S\H@T\G4U<'#R<DN#0H@ +M(" @[L\L(-<@T]?/P"#/WL72Q<38+"#7T\4@W-3)(-#2S\/%T]/9(-#2T<W/ +M(-/7T=K!SMD@TR#)VLW%SL7.R<7-#0K0TLG7V=[.S\?/(,_+TM76Q<[)T2#Z +MP=#!Q,[/RB#EU\'2S]#9+B @[\[!(,_+P=K!S,'3V"#,R<//S2#+(,S)P]4@ +MTPT*SL73U,'"R<S8SMG-R2#)(,[%T-+%Q-/+P=K5Q<W9S<D@T,_3U,O/S<W5 +MSLG3U,G>Q=/+R<W)(,_"W<73U-?!S<DN("#^Q<T-"L3!S-C;Q2P@U,7-(,+/ +MS-C;R<T@T,_$S]K2Q<[)Q<T@VL'0P<3.V<H@S\+9U\'4Q<S8(-/-S]32R=0@ +MUR#)R"#3U,_2S\[5+ T*SL73S-7;P=?;R=/8(-#2S\?.S]K/UR#/(,?/U,_7 +MT=W)R-/1(-K!R,S%T]3.U=38(.77TL_0U2#-P=/3S]?9R"#.P=O%T]37R='( +M#0K-R<?2P<[4S]<@R2#0TL_>R<@@SL70TLG1U,[/T]31R"X-"B @("#SP<W9 +MQ2#+TM70SMG%+"#2P=K5S<7%U-/1+"#/ULG$P<#4T]$@T\\@T]3/TL_.V2#" +MV=?;Q<?/(///U\74T\O/Q\\-"O//P-K!+"#+S]3/TMG*(-[!W<4@U]/%Q\\@ +MU\_3T-+)SLG-P<74T]$@R\'+(-#/U,7.P\G!S-C.V<H@R=/4S][.R<L@T<3% +MTL[9R T*R\'4P=/4TL_&(,D@R]+/U\'7V<@@S<76SL'#R<_.P<S8SMG((,O/ +MSL;,R<O4S]<N("#WS]0@U\'-(,D@T,_>U\$@Q,S1(,[/U]G(#0K3U-+!R,_7 +M.R#7S]0@R2#)T]3/R\D@U\[%VL'0SL_'SR#+S\[3Q=+7P=3)U\[/Q\\@R]+% +MSL$@VL'0P<3.S\?/(,_"W<73U-?!+ T*Q<?/(-31U,_4Q<[)T2#+(,+/S,7% +M(-;%T]3+S\W5(-+%ULG-U2P@P2#:P<_$SL\@R2#+(,[/U\_-U2#2P=K$Q<S) +MU,7,V,[/S=4-"MK!SL'7Q=/5+"#+S]3/TMG*(,+9(,_'TL'$R<P@Q<?/(,_4 +M(,[!V\7*(-[!T]3)(-/7Q=3!+@T*(" @(/#2R<W%TB#GQ=+-P<[)R2P@TL7; +MR=?;Q<H@UR#/U-?%U"#.P2#0S\?2S\W9(-?9Q-?/TLG4V"#:P2#3U\_)(-#2 +MQ<3%S-D-"M39T]'>R2#2U<W9SM/+R<@@P]G'P<X@R2#$P=;%(,G:S<7.R=38 +M(,O/SM/4R=35P\G (-,@U,7-+"#>U,_"V2#/Q]+!SLG>R=38#0K>R=/,SR#0 +MTL74Q<[$Q<[4S]<@SL$@T,_,R=3)WL73R\_%(-7"Q=;)W<4L(-/7R<3%U,7, +MV-/4U]7%U"#/(-3/S2P@WM3/#0K0TL'7T=W)Q2#:P=#!Q,[9Q2#+TM7'R2#7 +MV<[5UL3%SMD@TL7!Q\G2S]?!U-@@SL$@SL_7V<4@T]32P<C)+B @]\_:SLG+ +MP<74#0K7S]#2S],Z(,$@SL4@VL'3U,'7T=0@S,D@W-3)(-/4TL'(R2#7(-73 +MS,_7R='((-?/VLW/UL[/Q\\@U<C5Q-O%SLG1#0K<R\_.S\W)WL73R\_'SR#0 +MS\S/UL7.R=$@PL_,V-O)SM/4U\$@Q=?2S]#%RM/+R<@@Q\_3U<3!TM/4UR#0 +MTL_*U,D@R<@-"M[%TL7:(,+/S,7:SL7.SMG%(,G3T-G4P<[)T2#.P2#0TLG7 +MQ=+6Q<[.S]/4V"#)Q,71S2#$Q<W/R]+!U,G)/PT*(" @(/<@T-+)U\72UL7. +MSL_3U,D@Q<H@U2#.V<[%V\[)R"#0TL'7T=W)R"#<S,G4(/K!T,'$P2#3S\W. +MQ<[)RB#.Q=0N#0KNSR#+P<O)S2#"U<3%U"#.S]?/Q2#0S\O/S,7.R<4@T,_, +MR=3)WL73R\G((,3%T=3%S,7*+"#.Q2#0S\K$H]0@S,D@S\[/#0K.P2#0S]?/ +MQ-4@U2#0S]#2P=?%U]O%RB#>P=/4R2#/PMW%T]37P3\@(/#/SM'4SL\L(-[4 +MSR#<U,_4(-?/T-+/TR#>P=W%#0K7T\7'SR#3S]#2S]?/UL3!Q=33T2#4TL77 +MS];.V<T@U]K'S-'$S\T@UR#3U,_2S\[5(.?%TLW!SLG)+"#0TL77TL'=P<#= +MQ<K3T0T*T\7'S\3.T2#7(,3/S<G.R=+5P-W)RB#&P<O4S](@Q=?2S]#%RM/+ +MS\H@T\/%SMDN#0H@(" @(" @(" @(" @(" @(" @(" @*,_+S\[>P<[)Q2#3 +*S,7$U<74*0T* H@ + +end diff --git a/support/translit/example.pho b/support/translit/example.pho new file mode 100644 index 0000000000..ae79bfb29d --- /dev/null +++ b/support/translit/example.pho @@ -0,0 +1,103 @@ +A B V G D JE JO ZH Z I J K L M N O P R S T U F KH C Ch Sh Shch " Y ' EH JU JA S
+a b v g d e jo zh z i j k l m n o p r s t u f kh c ch sh shch " y ' eh ju ja T
+ (iz gazety SMoskovskie novostiT, 6.12.92)
+ VYZOV (chast' pervaja)
+ V kakoj suete my segodnja zhivjom. Dazhe politika, i ta davno uzhe
+perestala nas zanimat'. My obrashchaem na nejo vnimanie tol'ko togda, kogda
+naverkhu razgoraetsja ocherednaja svara. Ne volnujut nas i mirovye problemy.
+Chto zh, zazemljonnost' nashego bytija vpolne ponjatna. A mezhdu tem proiskhodjashchee
+vokrug dejstvitel'no priobretaet global'nye izmerenija.
+ ..................................
+ SSSR UMJER. KTO POBJEDIL?
+ ...Itak, tol'ko teper' nachinajut vyrisovyvat'sja kontury tekh grandioznykh
+posledstvij, kotorye svjazany s krakhom kommunizma v Sovetskom Sojuze i ego
+raspadom. JEshchjo vchera zarubezhnye analitiki s olimpijskim bespristrastiem
+vzirali na bezrassudochnye izgiby nashego vyryvnogo i neponjatnogo dvizhenija.
+Segodnja uzhe mnogim stanovitsja jasno, chto sumburnye konvul'sii
+postkommunisticheskogo mira samym neposredstvennym obrazom zatragivajut
+dal'nejshuju sud'bu vsego mezhdunarodnogo soobshchestva. Da, kommunizm rukhnul,
+SSSR ischez s politicheskoj karty, no tem samym byla zavershena celaja glava
+v istorii vsej civilizacii.
+ Ne tol'ko nasledniki kommunizma, no i ostal'noj mir okazalis' vdrug
+pered chistym listom. Po mere osoznanija ehtogo fakta v zarubezhnykh
+politicheskikh krugakh pervaja ehjforija pobedy nad Simperiej zlaT i nekoego
+samoudovletvorenija smenjaetsja vsjo bol'shej ozabochennost'ju, rasterjannost'ju,
+a koe-gde i panikoj. Rech' idjot ne tol'ko o trevoge, vyzvannoj
+nepredskazuemost'ju processov na territorii vcherashnego SSSR. Kstati, poka
+oni ne prinjali stol' apokalipsicheskoj formy, kak ozhidali mnogie, i
+protekajut v otlichie ot JUgoslavii bolee civilizovanno.
+ Vdrug s ochevidnost'ju otkrylos' drugoe - chto, nesmotrja na vneshne
+absoljutnuju protivopolozhnost' zapadnoj i kommunisticheskoj sistem, oni
+vzaimosvjazany. Mekhanizm razvitija toj i drugoj, kak teper' obnaruzhivaetsja,
+byl zaprogrammirovan na nalichie svoego antagonista.
+ JEshchjo predstoit razobrat'sja, v kakoj stepeni te ili inye tendencii
+obshchestvennoj zhizni Zapada javilis' rezul'tatom ego vnutrennyj ehvoljucii, a
+v kakoj byli obuslovleny sushchestvovaniem kommunisticheskogo obshchestva, i
+naoborot. No zapadnyj mir, tak dolgo i aktivno dobivavshijsja konca
+kommunizma, okazalsja ne podgotovlennym k zhizni posle ego padenija. Ono
+narushilo global'nuju sistemu bezopasnosti i obshchezhitija, kotoraja skrupuljozno
+sozdavalas' posle vtoroj mirovoj vojny, uspela obrasti svoej bjurokratiej i
+poluchit' dazhe sobstvennuju logiku razvitija. A tut v odno mgnovenie ehtot
+miroporjadok razvalilsja.
+ Vmeste s nim pokachnulas' vsja razvetvljonnaja sistema institutov i
+cennostej, na kotorykh do sikh por derzhalos' khrupkoe mirovoe ravnovesie.
+Stalo jasno, chto ne tol'ko byvshim kommunisticheskim gosudarstvam, no i
+vsemu mirovomu soobshchestvu predstoit iskat' novye formy sushchestvovanija.
+Pridjotsja zanovo osmyslivat' mnogie voprosy, kazavshiesja raz i navsegda
+reshjonnymi. Skazhem, stabil'nost' granic ili obespechenie celostnosti
+gosudarstv. A prava nacij na samoopredelenie, novyj federalizm i
+sochetanie kriteriev nacional'nogo vozrozhdenija i demokratii? Segodnja ehti
+voprosy podnjaty postkommunisticheskimi obshchestvami. No vot-vot k nim vnov'
+vozvratjatsja (uzhe vozvrashchajutsja) gosudarstva Azii i Afriki, gde
+sootvetstvujushchie processy byli v svojo vremja iskusstvenno zamorozheny.
+ Prikhoditsja preodolevat' i nashi nedavnie illjuzii. Skol'ko bylo
+vostorgov po povodu raspada bipoljanoj sistemy mezhdu narodnykh otnoshenij,
+pokoivshejsja na sopernichestve i vzaimnom sderzhivanii dvukh jadernykh
+sverkhderzhav - SShA i SSSR. Dumalos', vot ono, nastuplenie davno
+iskomogo bezoblachnogo miroporjadka. Ne tut-to bylo. Ugroza global'noj
+jadernoj konfrontacii dejstvitel'no snizilas'. No vzamen byvshego
+kommunisticheskogo lagerja mir poluchil celyj SbuketT problem - i rozhdenie
+novykh gosudarstv, i peresmotr granic, i konflikty po povodu prav
+nacmen'shinstv, i nakonec, srazu dve vojny - na Balkanakh i Kavkaze. Takovo
+prjamoe sledstvie padenija SSSR, zheleznoj khvatkoj podavljavshego, zagonjavshego
+vovnutr' vse protivorechija vnutri sebja i v sfere svoego vlijanija, chto tem
+samym usilivalo moshch' ikh potencial'nogo vzryva posle vykhoda na poverkhnost'.
+ EHKHO SOVJETSKOGO RASPADA
+ Dannyj khod sobytij mozhno bylo legko prognozirovat'. No malo kto dumal,
+kakovo budet vlijanie sovetskogo krushenija na vzaimootnoshenija vnutri zapadnogo
+soobshchestva. Segodnja uzhe ochevidno, chto Sojuz byl nemalovazhnym faktorom
+splochenija ehtogo soobshchestva i raspad sovetskogo gosudarstva javilsja tolchkom,
+kotoryj usilil na Zapade centrobezhnye tendencii, vyjavil nesovpadenie
+interesov industrial'nykh stran. Na fone tendencij, nametivshikhsja vnutri JES,
+dal'nejshaja sud'ba evropejskoj integracii uzhe ne vygljadit bezoblachnoj.
+Konechno, ob"jasnjaetsja ehto vnutrennimi processami v zapadnoevropejskikh stranakh.
+Tot fakt, chto prakticheski povsjudu nachali vdrug govorit' ne ob integracii,
+a o nacional'nykh interesakh, trebovat' ne raspakhnut' okno v mir, a opustit'
+shtory, vo mnogom javljaetsja sledstviem popravlenija obshchestvennogo mnenija,
+aktiviizacii nacionalisticheskikh gruppirovok, povsemestnogo ukhudshenija
+ehkonomicheskoj situacii.
+ No, v svoju ochered', vse ehti processy prjamo svjazany s izmeneniem
+privychnogo okruzhenija Zapadnoj JEvaropy. Ona okazalas' licom k licu s
+nestabil'nymi i nepredskazuemymi postkommunisticheskimi obshchestvami. Chem
+dal'she, tem bol'shim podozreniem zapadnyj obyvatel' smotrit v ikh storonu,
+neslushavshis' prognozov o gotovjashchikhsja zakhlestnut' JEvropu massovykh nashestvijakh
+migrantov i prochikh neprijatnostjakh.
+ Samye krupnye, razumeetsja, ozhidajutsja so storony byvshego Sovetskogo
+Sojuza, kotoryj chashche vsego vosprinimaetsja kak potencial'nyj istochnik jadernykh
+katastrof i krovavykh mezhnacional'nykh konfliktov. Vot vam i pochva dlja novykh
+strakhov; vot i istoki vnezapnogo konservativnogo krena zapadnogo obshchestva,
+ego tjatotenija k bolee zhestkomu rezhimu, a zaodno i k novomu razdelitel'nomu
+zanavesu, kotoryj by ogradil ego ot nashej chasti sveta.
+ Primer Germanii, reshivshej v otvet na pogromy vydvorit' za svoi predely
+tysjachi rumynskikh cygan i dazhe izmenit' konstituciju s tem, chtoby ogranichit'
+chislo pretendentov na politicheskoe ubezhishche, svidetel'stvuet o tom, chto
+pravjashchie zapadnye krugi vynuzhdeny reagirovat' na novye strakhi. Voznikaet
+vopros: a ne zastavjat li ehti strakhi v uslovijakh vozmozhnogo ukhudshenija
+ehkonomicheskogo polozhenija bol'shinstva evropejskikh gosudarstv projti ikh
+cherez boleznennye ispytanija na priverzhennost' idejam demokratii?
+ V priverzhennosti ej u nyneshnikh pravjashchikh ehlit Zapada somnenij net.
+No kakim budet novoe pokolenie politicheskikh dejatelej, ne pojdjot li ono
+na povodu u popravevshej chasti obshchestva? Ponjatno, chto ehtot vopros chashche
+vsego soprovozhdaetsja trevozhnym vzgljadom v storonu Germanii, prevrashchajushchejsja
+segodnja v dominirujushchij faktor evropejskoj sceny.
+ (okonchanie sleduet)
diff --git a/support/translit/example.tex b/support/translit/example.tex new file mode 100644 index 0000000000..504da0d7ab --- /dev/null +++ b/support/translit/example.tex @@ -0,0 +1,110 @@ +\documentstyle{article} +\input cyracc.def +\font\tencyr=wncyr10 +\def\cyr{\tencyr\cyracc} +\begin{document} + {\cyr A B V G D E \"E Zh Z I {\u I} K L M N O P R S T U F Kh C Ch Sh Shch {\Cdprime} Y {\Cprime} \`E Yu Ya S\\
+a b v g d e \"e zh z i {\u i} k l m n o p r s t u f kh c ch sh shch {\cdprime} y {\cprime} \`e yu ya T\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ } (iz gazety SMoskovskie novostiT, 6.12.92)\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ } VYZOV{\ \ } (chast{\cprime} pervaya)\\
+{\ \ }{\ \ }V kako{\u i} suete my segodnya zhiv\"em.{\ \ }Dazhe politika, i ta davno uzhe\\
+perestala nas zanimat{\cprime}.{\ \ }My obrashchaem na ne\"e vnimanie tol{\cprime}ko togda, kogda\\
+naverkhu razgoraet{\cydot}sya ocherednaya svara.{\ \ }Ne volnuyut nas i mirovye problemy.\\
+Chto zh, zazeml\"ennost{\cprime} nashego bytiya vpolne ponyatna.{\ \ }A mezhdu tem proiskhodyashchee\\
+vokrug de{\u i}stvitel{\cprime}no priobretaet global{\cprime}nye izmereniya.\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }..................................\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ } SSSR UMER.{\ \ }KTO POBEDIL?\\
+{\ \ }{\ \ }...Itak, tol{\cprime}ko teper{\cprime} nachinayut vyrisovyvat{\cprime}sya kontury tekh grandioznykh\\
+posledstvi{\u i}, kotorye svyazany s krakhom kommunizma v Sovet{\cydot}skom Soyuze i ego\\
+raspadom.{\ \ }Eshch\"e vchera zarubezhnye analitiki s olimpi{\u i}skim bespristrastiem\\
+vzirali na bezrassudochnye izgiby nashego vyryvnogo i neponyatnogo dvizheniya.\\
+Segodnya uzhe mnogim stanovit{\cydot}sya yasno, chto sumburnye konvul{\cprime}sii\\
+postkommunisticheskogo mira samym neposredstvennym obrazom zatragivayut\\
+dal{\cprime}ne{\u i}shuyu sud{\cprime}bu vsego mezhdunarodnogo soobshchestva.{\ \ }Da, kommunizm rukhnul,\\
+SSSR ischez s politichesko{\u i} karty, no tem samym byla zavershena celaya glava\\
+v istorii vse{\u i} civilizacii.\\
+{\ \ }{\ \ }Ne tol{\cprime}ko nasledniki kommunizma, no i ostal{\cprime}no{\u i} mir okazalis{\cprime} vdrug\\
+pered chistym listom.{\ \ }Po mere osoznaniya \`etogo fakta v zarubezhnykh\\
+politicheskikh krugakh pervaya \`e{\u i}foriya pobedy nad Simperie{\u i} zlaT i nekoego\\
+samoudovletvoreniya smenyaet{\cydot}sya vs\"e bol{\cprime}she{\u i} ozabochennost{\cprime}yu, rasteryannost{\cprime}yu,\\
+a koe-gde i paniko{\u i}.{\ \ }Rech{\cprime} id\"et ne tol{\cprime}ko o trevoge, vyzvanno{\u i}\\
+nepredskazuemost{\cprime}yu processov na territorii vcherashnego SSSR.{\ \ }Kstati, poka\\
+oni ne prinyali stol{\cprime} apokalipsichesko{\u i} formy, kak ozhidali mnogie, i\\
+protekayut v otlichie ot Yugoslavii bolee civilizovanno.\\
+{\ \ }{\ \ }Vdrug s ochevidnost{\cprime}yu otkrylos{\cprime} drugoe - chto, nesmotrya na vneshne\\
+absolyutnuyu protivopolozhnost{\cprime} zapadno{\u i} i kommunistichesko{\u i} sistem, oni\\
+vzaimosvyazany.{\ \ }Mekhanizm razvitiya to{\u i} i drugo{\u i}, kak teper{\cprime} obnaruzhivaet{\cydot}sya,\\
+byl zaprogrammirovan na nalichie svoego antagonista.\\
+{\ \ }{\ \ }Eshch\"e predstoit razobrat{\cprime}sya, v kako{\u i} stepeni te ili inye tendencii\\
+obshchestvenno{\u i} zhizni Zapada yavilis{\cprime} rezul{\cprime}tatom ego vnutrenny{\u i} \`evolyucii, a\\
+v kako{\u i} byli obuslovleny sushchestvovaniem kommunisticheskogo obshchestva, i\\
+naoborot.{\ \ }No zapadny{\u i} mir, tak dolgo i aktivno dobivavshi{\u i}sya konca\\
+kommunizma, okazalsya ne podgotovlennym k zhizni posle ego padeniya.{\ \ }Ono\\
+narushilo global{\cprime}nuyu sistemu bezopasnosti i obshchezhitiya, kotoraya skrupul\"ezno\\
+sozdavalas{\cprime} posle vtoro{\u i} mirovo{\u i} vo{\u i}ny, uspela obrasti svoe{\u i} byurokratie{\u i} i\\
+poluchit{\cprime} dazhe sobstvennuyu logiku razvitiya.{\ \ }A tut v odno mgnovenie \`etot\\
+miroporyadok razvalilsya.\\
+{\ \ }{\ \ }Vmeste s nim pokachnulas{\cprime} vsya razvetvl\"ennaya sistema institutov i\\
+cennoste{\u i}, na kotorykh do sikh por derzhalos{\cprime} khrupkoe mirovoe ravnovesie.\\
+Stalo yasno, chto ne tol{\cprime}ko byvshim kommunisticheskim gosudarstvam, no i\\
+vsemu mirovomu soobshchestvu predstoit iskat{\cprime} novye formy sushchestvovaniya.\\
+Prid\"et{\cydot}sya zanovo osmyslivat{\cprime} mnogie voprosy, kazavshiesya raz i navsegda\\
+resh\"ennymi.{\ \ }Skazhem, stabil{\cprime}nost{\cprime} granic ili obespechenie celostnosti\\
+gosudarstv.{\ \ }A prava naci{\u i} na samoopredelenie, novy{\u i} federalizm i\\
+sochetanie kriteriev nacional{\cprime}nogo vozrozhdeniya i demokratii?{\ \ }Segodnya \`eti\\
+voprosy podnyaty postkommunisticheskimi obshchestvami.{\ \ }No vot-vot k nim vnov{\cprime}\\
+vozvratyat{\cydot}sya (uzhe vozvrashchayut{\cydot}sya) gosudarstva Azii i Afriki, gde\\
+sootvet{\cydot}stvuyushchie processy byli v svo\"e vremya iskusstvenno zamorozheny.\\
+{\ \ }{\ \ }Prikhodit{\cydot}sya preodolevat{\cprime} i nashi nedavnie illyuzii.{\ \ }Skol{\cprime}ko bylo\\
+vostorgov po povodu raspada bipolyano{\u i} sistemy mezhdu narodnykh otnosheni{\u i},\\
+pokoivshe{\u i}sya na sopernichestve i vzaimnom sderzhivanii dvukh yadernykh\\
+sverkhderzhav - SShA i SSSR.{\ \ }Dumalos{\cprime}, vot ono, nastuplenie davno\\
+iskomogo bezoblachnogo miroporyadka.{\ \ }Ne tut-to bylo.{\ \ }Ugroza global{\cprime}no{\u i}\\
+yaderno{\u i} konfrontacii de{\u i}stvitel{\cprime}no snizilas{\cprime}.{\ \ }No vzamen byvshego\\
+kommunisticheskogo lagerya mir poluchil cely{\u i} SbuketT problem - i rozhdenie\\
+novykh gosudarstv, i peresmotr granic, i konflikty po povodu prav\\
+nacmen{\cprime}shinstv, i nakonec, srazu dve vo{\u i}ny - na Balkanakh i Kavkaze.{\ \ }Takovo\\
+pryamoe sledstvie padeniya SSSR, zhelezno{\u i} khvatko{\u i} podavlyavshego, zagonyavshego\\
+vovnutr{\cprime} vse protivorechiya vnutri sebya i v sfere svoego vliyaniya, chto tem\\
+samym usilivalo moshch{\cprime} ikh potencial{\cprime}nogo vzryva posle vykhoda na poverkhnost{\cprime}.\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }\`EKhO SOVET{\cydot}SKOGO RASPADA\\
+{\ \ }{\ \ }Danny{\u i} khod sobyti{\u i} mozhno bylo legko prognozirovat{\cprime}.{\ \ }No malo kto dumal,\\
+kakovo budet vliyanie sovet{\cydot}skogo krusheniya na vzaimootnosheniya vnutri zapadnogo\\
+soobshchestva.{\ \ }Segodnya uzhe ochevidno, chto Soyuz byl nemalovazhnym faktorom\\
+splocheniya \`etogo soobshchestva i raspad sovet{\cydot}skogo gosudarstva yavilsya tolchkom,\\
+kotory{\u i} usilil na Zapade centrobezhnye tendencii, vyyavil nesovpadenie\\
+interesov industrial{\cprime}nykh stran.{\ \ }Na fone tendenci{\u i}, nametivshikhsya vnutri ES,\\
+dal{\cprime}ne{\u i}shaya sud{\cprime}ba evrope{\u i}sko{\u i} integracii uzhe ne vyglyadit bezoblachno{\u i}.\\
+Konechno, ob{\cdprime}yasnyaet{\cydot}sya \`eto vnutrennimi processami v zapadnoevrope{\u i}skikh stranakh.\\
+Tot fakt, chto prakticheski povsyudu nachali vdrug govorit{\cprime} ne ob integracii,\\
+a o nacional{\cprime}nykh interesakh, trebovat{\cprime} ne raspakhnut{\cprime} okno v mir, a opustit{\cprime}\\
+shtory, vo mnogom yavlyaet{\cydot}sya sledstviem popravleniya obshchestvennogo mneniya,\\
+aktiviizacii nacionalisticheskikh gruppirovok, povsemestnogo ukhudsheniya\\
+\`ekonomichesko{\u i} situacii.\\
+{\ \ }{\ \ }No, v svoyu ochered{\cprime}, vse \`eti processy pryamo svyazany s izmeneniem\\
+privychnogo okruzheniya Zapadno{\u i} Evaropy.{\ \ }Ona okazalas{\cprime} licom k licu s\\
+nestabil{\cprime}nymi i nepredskazuemymi postkommunisticheskimi obshchestvami.{\ \ }Chem\\
+dal{\cprime}she, tem bol{\cprime}shim podozreniem zapadny{\u i} obyvatel{\cprime} smotrit v ikh storonu,\\
+neslushavshis{\cprime} prognozov o gotovyashchikhsya zakhlestnut{\cprime} Evropu massovykh nashestviyakh\\
+migrantov i prochikh nepriyatnostyakh.\\
+{\ \ }{\ \ }Samye krupnye, razumeet{\cydot}sya, ozhidayut{\cydot}sya so storony byvshego Sovet{\cydot}skogo\\
+Soyuza, kotory{\u i} chashche vsego vosprinimaet{\cydot}sya kak potencial{\cprime}ny{\u i} istochnik yadernykh\\
+katastrof i krovavykh mezhnacional{\cprime}nykh konfliktov.{\ \ }Vot vam i pochva dlya novykh\\
+strakhov; vot i istoki vnezapnogo konservativnogo krena zapadnogo obshchestva,\\
+ego tyatoteniya k bolee zhestkomu rezhimu, a zaodno i k novomu razdelitel{\cprime}nomu\\
+zanavesu, kotory{\u i} by ogradil ego ot nashe{\u i} chasti sveta.\\
+{\ \ }{\ \ }Primer Germanii, reshivshe{\u i} v otvet na pogromy vydvorit{\cprime} za svoi predely\\
+tysyachi rumynskikh cygan i dazhe izmenit{\cprime} konstituciyu s tem, chtoby ogranichit{\cprime}\\
+chislo pretendentov na politicheskoe ubezhishche, svidetel{\cprime}stvuet o tom, chto\\
+pravyashchie zapadnye krugi vynuzhdeny reagirovat{\cprime} na novye strakhi.{\ \ }Voznikaet\\
+vopros: a ne zastavyat li \`eti strakhi v usloviyakh vozmozhnogo ukhudsheniya\\
+\`ekonomicheskogo polozheniya bol{\cprime}shinstva evrope{\u i}skikh gosudarstv pro{\u i}ti ikh\\
+cherez boleznennye ispytaniya na priverzhennost{\cprime} ideyam demokratii?\\
+{\ \ }{\ \ }V priverzhennosti e{\u i} u nyneshnikh pravyashchikh \`elit Zapada somneni{\u i} net.\\
+No kakim budet novoe pokolenie politicheskikh deyatele{\u i}, ne po{\u i}d\"et li ono\\
+na povodu u popravevshe{\u i} chasti obshchestva?{\ \ }Ponyatno, chto \`etot vopros chashche\\
+vsego soprovozhdaet{\cydot}sya trevozhnym vzglyadom v storonu Germanii, prevrashchayushche{\u i}sya\\
+segodnya v dominiruyushchi{\u i} faktor evrope{\u i}sko{\u i} sceny.\\
+{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }{\ \ }(okonchanie sleduet)\\
+ } +\end{document} diff --git a/support/translit/gos-alt.rus b/support/translit/gos-alt.rus new file mode 100644 index 0000000000..d71e6bab43 --- /dev/null +++ b/support/translit/gos-alt.rus @@ -0,0 +1,94 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File gos_alt.rus + +# This is a transliteration data file for converting GOSTSCII 84 +# (approx. ISO-8859-5?) to ALT (Bryabrins alternativnyj variant) + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xA1" 0 "\0xf0" # capital Yo + 0 "\0xF1" 0 "\0xf1" # small yo + 0 "\0xB0" 0 "\0x80" # capital A + 0 "\0xB1" 0 "\0x81" # capital Be + 0 "\0xB2" 0 "\0x82" # capital Ve + 0 "\0xB3" 0 "\0x83" # capital Ghe + 0 "\0xB4" 0 "\0x84" # capital De + 0 "\0xB5" 0 "\0x85" # capital Ie + 0 "\0xB6" 0 "\0x86" # capital Zhe + 0 "\0xB7" 0 "\0x87" # capital Ze + 0 "\0xB8" 0 "\0x88" # capital I + 0 "\0xB9" 0 "\0x89" # capital short I + 0 "\0xBA" 0 "\0x8a" # capital Ka + 0 "\0xBB" 0 "\0x8b" # capital El + 0 "\0xBC" 0 "\0x8c" # capital Em + 0 "\0xBD" 0 "\0x8d" # capital En + 0 "\0xBE" 0 "\0x8e" # capital O + 0 "\0xBF" 0 "\0x8f" # capital Pe + 0 "\0xC0" 0 "\0x90" # capital Er + 0 "\0xC1" 0 "\0x91" # capital Es + 0 "\0xC2" 0 "\0x92" # capital Te + 0 "\0xC3" 0 "\0x93" # capital U + 0 "\0xC4" 0 "\0x94" # capital Ef + 0 "\0xC5" 0 "\0x95" # capital Kha + 0 "\0xC6" 0 "\0x96" # capital Tse + 0 "\0xC7" 0 "\0x97" # capital Che + 0 "\0xC8" 0 "\0x98" # capital Sha + 0 "\0xC9" 0 "\0x99" # capital Shcha + 0 "\0xCA" 0 "\0x9a" # capital hard sign (Ier) + 0 "\0xCB" 0 "\0x9b" # capital Y (Iery) + 0 "\0xCC" 0 "\0x9c" # capital soft sign Ierik + 0 "\0xCD" 0 "\0x9d" # capital reverse round E + 0 "\0xCE" 0 "\0x9e" # capital Yu + 0 "\0xCF" 0 "\0x9f" # capital Ya + 0 "\0xD0" 0 "\0xa0" # small a + 0 "\0xD1" 0 "\0xa1" # small be + 0 "\0xD2" 0 "\0xa2" # small ve + 0 "\0xD3" 0 "\0xa3" # small ghe + 0 "\0xD4" 0 "\0xa4" # small de + 0 "\0xD5" 0 "\0xa5" # small ie + 0 "\0xD6" 0 "\0xa6" # small zhe + 0 "\0xD7" 0 "\0xa7" # small z + 0 "\0xD8" 0 "\0xa8" # small i + 0 "\0xD9" 0 "\0xa9" # small short i + 0 "\0xDA" 0 "\0xaa" # small ka + 0 "\0xDB" 0 "\0xab" # small el + 0 "\0xDC" 0 "\0xac" # small em + 0 "\0xDD" 0 "\0xad" # small en + 0 "\0xDE" 0 "\0xae" # small o + 0 "\0xDF" 0 "\0xaf" # small pe + 0 "\0xE0" 0 "\0xe0" # small er + 0 "\0xE1" 0 "\0xe1" # small es + 0 "\0xE2" 0 "\0xe2" # small te + 0 "\0xE3" 0 "\0xe3" # small u + 0 "\0xE4" 0 "\0xe4" # small ef + 0 "\0xE5" 0 "\0xe5" # small kha + 0 "\0xE6" 0 "\0xe6" # small tse + 0 "\0xE7" 0 "\0xe7" # small che + 0 "\0xE8" 0 "\0xe8" # small sha + 0 "\0xE9" 0 "\0xe9" # small shcha + 0 "\0xEA" 0 "\0xea" # small hard sign (ier) + 0 "\0xEB" 0 "\0xeb" # small y (iery) + 0 "\0xEC" 0 "\0xec" # small soft sign (ierik) + 0 "\0xED" 0 "\0xed" # small reverse rounded e + 0 "\0xEE" 0 "\0xee" # small yu + 0 "\0xEF" 0 "\0xef" # small ya diff --git a/support/translit/gos-koi8.rus b/support/translit/gos-koi8.rus new file mode 100644 index 0000000000..e4589d134b --- /dev/null +++ b/support/translit/gos-koi8.rus @@ -0,0 +1,95 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File gos_koi8.rus + +# This is a transliteration data file for converting GOSTSCII 84 +# (approx. ISO-8859-5?) to KOI8 used by RELCOM +# KOI8 is meant to be GOST 19768-74 + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xF0" 0 "\0xB3" + 0 "\0xF1" 0 "\0xA3" #small yo + 0 "\0xB0" 0 "\0xE1" #capital A + 0 "\0xB1" 0 "\0xE2" #capital Be + 0 "\0xB2" 0 "\0xF7" #capital Ve + 0 "\0xB3" 0 "\0xE7" #capital Ghe + 0 "\0xB4" 0 "\0xE4" #capital De + 0 "\0xB5" 0 "\0xE5" #capital Ie + 0 "\0xB6" 0 "\0xF6" #capital Zhe + 0 "\0xB7" 0 "\0xFA" #capital Ze + 0 "\0xB8" 0 "\0xE9" #capital I + 0 "\0xB9" 0 "\0xEA" #capital short I + 0 "\0xBA" 0 "\0xEB" #capital Ka + 0 "\0xBB" 0 "\0xEC" #capital El + 0 "\0xBC" 0 "\0xED" #capital Em + 0 "\0xBD" 0 "\0xEE" #capital En + 0 "\0xBE" 0 "\0xEF" #capital O + 0 "\0xBF" 0 "\0xF0" #capital Pe + 0 "\0xC0" 0 "\0xF2" #capital Er + 0 "\0xC1" 0 "\0xF3" #capital Es + 0 "\0xC2" 0 "\0xF4" #capital Te + 0 "\0xC3" 0 "\0xF5" #capital U + 0 "\0xC4" 0 "\0xE6" #capital Ef + 0 "\0xC5" 0 "\0xE8" #capital Kha + 0 "\0xC6" 0 "\0xE3" #capital Tse + 0 "\0xC7" 0 "\0xFE" #capital Che + 0 "\0xC8" 0 "\0xFB" #capital Sha + 0 "\0xC9" 0 "\0xFD" #capital Shcha + 0 "\0xCA" 0 "\0xFF" #capital hard sign (Ier) + 0 "\0xCB" 0 "\0xF9" #capital Y (Iery) + 0 "\0xCC" 0 "\0xF8" #capit soft sign(Ierik) + 0 "\0xCD" 0 "\0xFC" #capit reverse rounded E + 0 "\0xCE" 0 "\0xE0" #capital Yu + 0 "\0xCF" 0 "\0xF1" #capital Ya + 0 "\0xD0" 0 "\0xC1" #small a + 0 "\0xD1" 0 "\0xC2" #small be + 0 "\0xD2" 0 "\0xD7" #small ve + 0 "\0xD3" 0 "\0xC7" #small ghe + 0 "\0xD4" 0 "\0xC4" #small de + 0 "\0xD5" 0 "\0xC5" #small ie + 0 "\0xD6" 0 "\0xD6" #small zhe + 0 "\0xD7" 0 "\0xDA" #small z + 0 "\0xD8" 0 "\0xC9" #small i + 0 "\0xD9" 0 "\0xCA" #small short i + 0 "\0xDA" 0 "\0xCB" #small ka + 0 "\0xDB" 0 "\0xCC" #small el + 0 "\0xDC" 0 "\0xCD" #small em + 0 "\0xDD" 0 "\0xCE" #small en + 0 "\0xDE" 0 "\0xCF" #small o + 0 "\0xDF" 0 "\0xD0" #small pe + 0 "\0xE0" 0 "\0xD2" #small er + 0 "\0xE1" 0 "\0xD3" #small es + 0 "\0xE2" 0 "\0xD4" #small te + 0 "\0xE3" 0 "\0xD5" #small u + 0 "\0xE4" 0 "\0xC6" #small ef + 0 "\0xE5" 0 "\0xC8" #small kha + 0 "\0xE6" 0 "\0xC3" #small tse + 0 "\0xE7" 0 "\0xDE" #small che + 0 "\0xE8" 0 "\0xDB" #small sha + 0 "\0xE9" 0 "\0xDD" #small shcha + 0 "\0xEA" 0 "\0xDF" #small hard sign (ier) + 0 "\0xEB" 0 "\0xD9" #small y (iery) + 0 "\0xEC" 0 "\0xD8" #small soft sign (ierik) + 0 "\0xED" 0 "\0xDC" #small rev rounded e + 0 "\0xEE" 0 "\0xC0" #small yu + 0 "\0xEF" 0 "\0xD1" #small ya diff --git a/support/translit/hex-text.rus b/support/translit/hex-text.rus new file mode 100644 index 0000000000..78cc341fdd --- /dev/null +++ b/support/translit/hex-text.rus @@ -0,0 +1,444 @@ +# Jan Labanowski, jkl@osc.edu, Apr 13, 1994 +# File hex-text.rus + +# This is a simple transliteration table which converts hex codes (which +# result from some e-mail programs converting codes to hexadecimal +# notation) to characters corresponding to these codes. +# E.g., the =20 is converted to a space. + + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table + + 0 "=01" 0 "\0x01" + 0 "=02" 0 "\0x02" + 0 "=03" 0 "\0x03" + 0 "=04" 0 "\0x04" + 0 "=05" 0 "\0x05" + 0 "=06" 0 "\0x06" + 0 "=07" 0 "\0x07" + 0 "=08" 0 "\0x08" + 0 "=09" 0 "\0x09" + 0 "=0A" 0 "\0x0A" + 0 "=0B" 0 "\0x0B" + 0 "=0C" 0 "\0x0C" + 0 "=0D" 0 "\0x0D" + 0 "=0E" 0 "\0x0E" + 0 "=0F" 0 "\0x0F" + 0 "=10" 0 "\0x10" + 0 "=11" 0 "\0x11" + 0 "=12" 0 "\0x12" + 0 "=13" 0 "\0x13" + 0 "=14" 0 "\0x14" + 0 "=15" 0 "\0x15" + 0 "=16" 0 "\0x16" + 0 "=17" 0 "\0x17" + 0 "=18" 0 "\0x18" + 0 "=19" 0 "\0x19" + 0 "=1A" 0 "\0x1A" + 0 "=1B" 0 "\0x1B" + 0 "=1C" 0 "\0x1C" + 0 "=1D" 0 "\0x1D" + 0 "=1E" 0 "\0x1E" + 0 "=1F" 0 "\0x1F" + 0 "=20" 0 "\0x20" + 0 "=21" 0 "\0x21" + 0 "=22" 0 "\0x22" + 0 "=23" 0 "\0x23" + 0 "=24" 0 "\0x24" + 0 "=25" 0 "\0x25" + 0 "=26" 0 "\0x26" + 0 "=27" 0 "\0x27" + 0 "=28" 0 "\0x28" + 0 "=29" 0 "\0x29" + 0 "=2A" 0 "\0x2A" + 0 "=2B" 0 "\0x2B" + 0 "=2C" 0 "\0x2C" + 0 "=2D" 0 "\0x2D" + 0 "=2E" 0 "\0x2E" + 0 "=2F" 0 "\0x2F" + 0 "=30" 0 "\0x30" + 0 "=31" 0 "\0x31" + 0 "=32" 0 "\0x32" + 0 "=33" 0 "\0x33" + 0 "=34" 0 "\0x34" + 0 "=35" 0 "\0x35" + 0 "=36" 0 "\0x36" + 0 "=37" 0 "\0x37" + 0 "=38" 0 "\0x38" + 0 "=39" 0 "\0x39" + 0 "=3A" 0 "\0x3A" + 0 "=3B" 0 "\0x3B" + 0 "=3C" 0 "\0x3C" + 0 "=3D" 0 "\0x3D" + 0 "=3E" 0 "\0x3E" + 0 "=3F" 0 "\0x3F" + 0 "=40" 0 "\0x40" + 0 "=41" 0 "\0x41" + 0 "=42" 0 "\0x42" + 0 "=43" 0 "\0x43" + 0 "=44" 0 "\0x44" + 0 "=45" 0 "\0x45" + 0 "=46" 0 "\0x46" + 0 "=47" 0 "\0x47" + 0 "=48" 0 "\0x48" + 0 "=49" 0 "\0x49" + 0 "=4A" 0 "\0x4A" + 0 "=4B" 0 "\0x4B" + 0 "=4C" 0 "\0x4C" + 0 "=4D" 0 "\0x4D" + 0 "=4E" 0 "\0x4E" + 0 "=4F" 0 "\0x4F" + 0 "=50" 0 "\0x50" + 0 "=51" 0 "\0x51" + 0 "=52" 0 "\0x52" + 0 "=53" 0 "\0x53" + 0 "=54" 0 "\0x54" + 0 "=55" 0 "\0x55" + 0 "=56" 0 "\0x56" + 0 "=57" 0 "\0x57" + 0 "=58" 0 "\0x58" + 0 "=59" 0 "\0x59" + 0 "=5A" 0 "\0x5A" + 0 "=5B" 0 "\0x5B" + 0 "=5C" 0 "\0x5C" + 0 "=5D" 0 "\0x5D" + 0 "=5E" 0 "\0x5E" + 0 "=5F" 0 "\0x5F" + 0 "=60" 0 "\0x60" + 0 "=61" 0 "\0x61" + 0 "=62" 0 "\0x62" + 0 "=63" 0 "\0x63" + 0 "=64" 0 "\0x64" + 0 "=65" 0 "\0x65" + 0 "=66" 0 "\0x66" + 0 "=67" 0 "\0x67" + 0 "=68" 0 "\0x68" + 0 "=69" 0 "\0x69" + 0 "=6A" 0 "\0x6A" + 0 "=6B" 0 "\0x6B" + 0 "=6C" 0 "\0x6C" + 0 "=6D" 0 "\0x6D" + 0 "=6E" 0 "\0x6E" + 0 "=6F" 0 "\0x6F" + 0 "=70" 0 "\0x70" + 0 "=71" 0 "\0x71" + 0 "=72" 0 "\0x72" + 0 "=73" 0 "\0x73" + 0 "=74" 0 "\0x74" + 0 "=75" 0 "\0x75" + 0 "=76" 0 "\0x76" + 0 "=77" 0 "\0x77" + 0 "=78" 0 "\0x78" + 0 "=79" 0 "\0x79" + 0 "=7A" 0 "\0x7A" + 0 "=7B" 0 "\0x7B" + 0 "=7C" 0 "\0x7C" + 0 "=7D" 0 "\0x7D" + 0 "=7E" 0 "\0x7E" + 0 "=7F" 0 "\0x7F" + 0 "=80" 0 "\0x80" + 0 "=81" 0 "\0x81" + 0 "=82" 0 "\0x82" + 0 "=83" 0 "\0x83" + 0 "=84" 0 "\0x84" + 0 "=85" 0 "\0x85" + 0 "=86" 0 "\0x86" + 0 "=87" 0 "\0x87" + 0 "=88" 0 "\0x88" + 0 "=89" 0 "\0x89" + 0 "=8A" 0 "\0x8A" + 0 "=8B" 0 "\0x8B" + 0 "=8C" 0 "\0x8C" + 0 "=8D" 0 "\0x8D" + 0 "=8E" 0 "\0x8E" + 0 "=8F" 0 "\0x8F" + 0 "=90" 0 "\0x90" + 0 "=91" 0 "\0x91" + 0 "=92" 0 "\0x92" + 0 "=93" 0 "\0x93" + 0 "=94" 0 "\0x94" + 0 "=95" 0 "\0x95" + 0 "=96" 0 "\0x96" + 0 "=97" 0 "\0x97" + 0 "=98" 0 "\0x98" + 0 "=99" 0 "\0x99" + 0 "=9A" 0 "\0x9A" + 0 "=9B" 0 "\0x9B" + 0 "=9C" 0 "\0x9C" + 0 "=9D" 0 "\0x9D" + 0 "=9E" 0 "\0x9E" + 0 "=9F" 0 "\0x9F" + 0 "=A0" 0 "\0xA0" + 0 "=A1" 0 "\0xA1" + 0 "=A2" 0 "\0xA2" + 0 "=A3" 0 "\0xA3" + 0 "=A4" 0 "\0xA4" + 0 "=A5" 0 "\0xA5" + 0 "=A6" 0 "\0xA6" + 0 "=A7" 0 "\0xA7" + 0 "=A8" 0 "\0xA8" + 0 "=A9" 0 "\0xA9" + 0 "=AA" 0 "\0xAA" + 0 "=AB" 0 "\0xAB" + 0 "=AC" 0 "\0xAC" + 0 "=AD" 0 "\0xAD" + 0 "=AE" 0 "\0xAE" + 0 "=AF" 0 "\0xAF" + 0 "=B0" 0 "\0xB0" + 0 "=B1" 0 "\0xB1" + 0 "=B2" 0 "\0xB2" + 0 "=B3" 0 "\0xB3" + 0 "=B4" 0 "\0xB4" + 0 "=B5" 0 "\0xB5" + 0 "=B6" 0 "\0xB6" + 0 "=B7" 0 "\0xB7" + 0 "=B8" 0 "\0xB8" + 0 "=B9" 0 "\0xB9" + 0 "=BA" 0 "\0xBA" + 0 "=BB" 0 "\0xBB" + 0 "=BC" 0 "\0xBC" + 0 "=BD" 0 "\0xBD" + 0 "=BE" 0 "\0xBE" + 0 "=BF" 0 "\0xBF" + 0 "=C0" 0 "\0xC0" + 0 "=C1" 0 "\0xC1" + 0 "=C2" 0 "\0xC2" + 0 "=C3" 0 "\0xC3" + 0 "=C4" 0 "\0xC4" + 0 "=C5" 0 "\0xC5" + 0 "=C6" 0 "\0xC6" + 0 "=C7" 0 "\0xC7" + 0 "=C8" 0 "\0xC8" + 0 "=C9" 0 "\0xC9" + 0 "=CA" 0 "\0xCA" + 0 "=CB" 0 "\0xCB" + 0 "=CC" 0 "\0xCC" + 0 "=CD" 0 "\0xCD" + 0 "=CE" 0 "\0xCE" + 0 "=CF" 0 "\0xCF" + 0 "=D0" 0 "\0xD0" + 0 "=D1" 0 "\0xD1" + 0 "=D2" 0 "\0xD2" + 0 "=D3" 0 "\0xD3" + 0 "=D4" 0 "\0xD4" + 0 "=D5" 0 "\0xD5" + 0 "=D6" 0 "\0xD6" + 0 "=D7" 0 "\0xD7" + 0 "=D8" 0 "\0xD8" + 0 "=D9" 0 "\0xD9" + 0 "=DA" 0 "\0xDA" + 0 "=DB" 0 "\0xDB" + 0 "=DC" 0 "\0xDC" + 0 "=DD" 0 "\0xDD" + 0 "=DE" 0 "\0xDE" + 0 "=DF" 0 "\0xDF" + 0 "=E0" 0 "\0xE0" + 0 "=E1" 0 "\0xE1" + 0 "=E2" 0 "\0xE2" + 0 "=E3" 0 "\0xE3" + 0 "=E4" 0 "\0xE4" + 0 "=E5" 0 "\0xE5" + 0 "=E6" 0 "\0xE6" + 0 "=E7" 0 "\0xE7" + 0 "=E8" 0 "\0xE8" + 0 "=E9" 0 "\0xE9" + 0 "=EA" 0 "\0xEA" + 0 "=EB" 0 "\0xEB" + 0 "=EC" 0 "\0xEC" + 0 "=ED" 0 "\0xED" + 0 "=EE" 0 "\0xEE" + 0 "=EF" 0 "\0xEF" + 0 "=F0" 0 "\0xF0" + 0 "=F1" 0 "\0xF1" + 0 "=F2" 0 "\0xF2" + 0 "=F3" 0 "\0xF3" + 0 "=F4" 0 "\0xF4" + 0 "=F5" 0 "\0xF5" + 0 "=F6" 0 "\0xF6" + 0 "=F7" 0 "\0xF7" + 0 "=F8" 0 "\0xF8" + 0 "=F9" 0 "\0xF9" + 0 "=FA" 0 "\0xFA" + 0 "=FB" 0 "\0xFB" + 0 "=FC" 0 "\0xFC" + 0 "=FD" 0 "\0xFD" + 0 "=FE" 0 "\0xFE" + 0 "=FF" 0 "\0xFF" +# lowercase hex notation + 0 "=0a" 0 "\0x0A" + 0 "=0b" 0 "\0x0B" + 0 "=0c" 0 "\0x0C" + 0 "=0d" 0 "\0x0D" + 0 "=0e" 0 "\0x0E" + 0 "=0f" 0 "\0x0F" + 0 "=1a" 0 "\0x1A" + 0 "=1b" 0 "\0x1B" + 0 "=1c" 0 "\0x1C" + 0 "=1d" 0 "\0x1D" + 0 "=1e" 0 "\0x1E" + 0 "=1f" 0 "\0x1F" + 0 "=2a" 0 "\0x2A" + 0 "=2b" 0 "\0x2B" + 0 "=2c" 0 "\0x2C" + 0 "=2d" 0 "\0x2D" + 0 "=2e" 0 "\0x2E" + 0 "=2f" 0 "\0x2F" + 0 "=3a" 0 "\0x3A" + 0 "=3b" 0 "\0x3B" + 0 "=3c" 0 "\0x3C" + 0 "=3d" 0 "\0x3D" + 0 "=3e" 0 "\0x3E" + 0 "=3f" 0 "\0x3F" + 0 "=4a" 0 "\0x4A" + 0 "=4b" 0 "\0x4B" + 0 "=4c" 0 "\0x4C" + 0 "=4d" 0 "\0x4D" + 0 "=4e" 0 "\0x4E" + 0 "=4f" 0 "\0x4F" + 0 "=5a" 0 "\0x5A" + 0 "=5b" 0 "\0x5B" + 0 "=5c" 0 "\0x5C" + 0 "=5d" 0 "\0x5D" + 0 "=5e" 0 "\0x5E" + 0 "=5f" 0 "\0x5F" + 0 "=6a" 0 "\0x6A" + 0 "=6b" 0 "\0x6B" + 0 "=6c" 0 "\0x6C" + 0 "=6d" 0 "\0x6D" + 0 "=6e" 0 "\0x6E" + 0 "=6f" 0 "\0x6F" + 0 "=7a" 0 "\0x7A" + 0 "=7b" 0 "\0x7B" + 0 "=7c" 0 "\0x7C" + 0 "=7d" 0 "\0x7D" + 0 "=7e" 0 "\0x7E" + 0 "=7f" 0 "\0x7F" + 0 "=8a" 0 "\0x8A" + 0 "=8b" 0 "\0x8B" + 0 "=8c" 0 "\0x8C" + 0 "=8d" 0 "\0x8D" + 0 "=8e" 0 "\0x8E" + 0 "=8f" 0 "\0x8F" + 0 "=9a" 0 "\0x9A" + 0 "=9b" 0 "\0x9B" + 0 "=9c" 0 "\0x9C" + 0 "=9d" 0 "\0x9D" + 0 "=9e" 0 "\0x9E" + 0 "=9f" 0 "\0x9F" + 0 "=a0" 0 "\0xA0" + 0 "=a1" 0 "\0xA1" + 0 "=a2" 0 "\0xA2" + 0 "=a3" 0 "\0xA3" + 0 "=a4" 0 "\0xA4" + 0 "=a5" 0 "\0xA5" + 0 "=a6" 0 "\0xA6" + 0 "=a7" 0 "\0xA7" + 0 "=a8" 0 "\0xA8" + 0 "=a9" 0 "\0xA9" + 0 "=aa" 0 "\0xAA" + 0 "=ab" 0 "\0xAB" + 0 "=ac" 0 "\0xAC" + 0 "=ad" 0 "\0xAD" + 0 "=ae" 0 "\0xAE" + 0 "=af" 0 "\0xAF" + 0 "=b0" 0 "\0xB0" + 0 "=b1" 0 "\0xB1" + 0 "=b2" 0 "\0xB2" + 0 "=b3" 0 "\0xB3" + 0 "=b4" 0 "\0xB4" + 0 "=b5" 0 "\0xB5" + 0 "=b6" 0 "\0xB6" + 0 "=b7" 0 "\0xB7" + 0 "=b8" 0 "\0xB8" + 0 "=b9" 0 "\0xB9" + 0 "=ba" 0 "\0xBA" + 0 "=bb" 0 "\0xBB" + 0 "=bc" 0 "\0xBC" + 0 "=bd" 0 "\0xBD" + 0 "=be" 0 "\0xBE" + 0 "=bf" 0 "\0xBF" + 0 "=c0" 0 "\0xC0" + 0 "=c1" 0 "\0xC1" + 0 "=c2" 0 "\0xC2" + 0 "=c3" 0 "\0xC3" + 0 "=c4" 0 "\0xC4" + 0 "=c5" 0 "\0xC5" + 0 "=c6" 0 "\0xC6" + 0 "=c7" 0 "\0xC7" + 0 "=c8" 0 "\0xC8" + 0 "=c9" 0 "\0xC9" + 0 "=ca" 0 "\0xCA" + 0 "=cb" 0 "\0xCB" + 0 "=cc" 0 "\0xCC" + 0 "=cd" 0 "\0xCD" + 0 "=ce" 0 "\0xCE" + 0 "=cf" 0 "\0xCF" + 0 "=d0" 0 "\0xD0" + 0 "=d1" 0 "\0xD1" + 0 "=d2" 0 "\0xD2" + 0 "=d3" 0 "\0xD3" + 0 "=d4" 0 "\0xD4" + 0 "=d5" 0 "\0xD5" + 0 "=d6" 0 "\0xD6" + 0 "=d7" 0 "\0xD7" + 0 "=d8" 0 "\0xD8" + 0 "=d9" 0 "\0xD9" + 0 "=da" 0 "\0xDA" + 0 "=db" 0 "\0xDB" + 0 "=dc" 0 "\0xDC" + 0 "=dd" 0 "\0xDD" + 0 "=de" 0 "\0xDE" + 0 "=df" 0 "\0xDF" + 0 "=e0" 0 "\0xE0" + 0 "=e1" 0 "\0xE1" + 0 "=e2" 0 "\0xE2" + 0 "=e3" 0 "\0xE3" + 0 "=e4" 0 "\0xE4" + 0 "=e5" 0 "\0xE5" + 0 "=e6" 0 "\0xE6" + 0 "=e7" 0 "\0xE7" + 0 "=e8" 0 "\0xE8" + 0 "=e9" 0 "\0xE9" + 0 "=ea" 0 "\0xEA" + 0 "=eb" 0 "\0xEB" + 0 "=ec" 0 "\0xEC" + 0 "=ed" 0 "\0xED" + 0 "=ee" 0 "\0xEE" + 0 "=ef" 0 "\0xEF" + 0 "=f0" 0 "\0xF0" + 0 "=f1" 0 "\0xF1" + 0 "=f2" 0 "\0xF2" + 0 "=f3" 0 "\0xF3" + 0 "=f4" 0 "\0xF4" + 0 "=f5" 0 "\0xF5" + 0 "=f6" 0 "\0xF6" + 0 "=f7" 0 "\0xF7" + 0 "=f8" 0 "\0xF8" + 0 "=f9" 0 "\0xF9" + 0 "=fa" 0 "\0xFA" + 0 "=fb" 0 "\0xFB" + 0 "=fc" 0 "\0xFC" + 0 "=fd" 0 "\0xFD" + 0 "=fe" 0 "\0xFE" + 0 "=ff" 0 "\0xFF" + diff --git a/support/translit/k8-1251.rus b/support/translit/k8-1251.rus new file mode 100644 index 0000000000..d4988c6e3e --- /dev/null +++ b/support/translit/k8-1251.rus @@ -0,0 +1,97 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 5, 1995 +# File k8-1251.rus + + +# This is a transliteration data file for converting from KOI8 +# KOI8 is meant to be GOST 19768-74, to MS Page 1251 (MS WINDOWS) +# To be used with translit.c program by Jan Labanowski + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "<<" 0 "\0xAB" # openning quote + 0 ">>" 0 "\0xBB" # closing quote + 0 "\0xB3" 0 "\0xA8" # capital Yo + 0 "\0xA3" 0 "\0xB8" # small yo + 0 "\0xE1" 0 "\0xC0" # capital A + 0 "\0xE2" 0 "\0xC1" # capital Be + 0 "\0xF7" 0 "\0xC2" # capital Ve + 0 "\0xE7" 0 "\0xC3" # capital Ghe + 0 "\0xE4" 0 "\0xC4" # capital De + 0 "\0xE5" 0 "\0xC5" # capital Ie + 0 "\0xF6" 0 "\0xC6" # capital Zhe + 0 "\0xFA" 0 "\0xC7" # capital Ze + 0 "\0xE9" 0 "\0xC8" # capital I + 0 "\0xEA" 0 "\0xC9" # capital short I + 0 "\0xEB" 0 "\0xCa" # capital Ka + 0 "\0xEC" 0 "\0xCb" # capital El + 0 "\0xED" 0 "\0xCc" # capital Em + 0 "\0xEE" 0 "\0xCd" # capital En + 0 "\0xEF" 0 "\0xCe" # capital O + 0 "\0xF0" 0 "\0xCf" # capital Pe + 0 "\0xF2" 0 "\0xD0" # capital Er + 0 "\0xF3" 0 "\0xD1" # capital Es + 0 "\0xF4" 0 "\0xD2" # capital Te + 0 "\0xF5" 0 "\0xD3" # capital U + 0 "\0xE6" 0 "\0xD4" # capital Ef + 0 "\0xE8" 0 "\0xD5" # capital Kha + 0 "\0xE3" 0 "\0xD6" # capital Tse + 0 "\0xFE" 0 "\0xD7" # capital Che + 0 "\0xFB" 0 "\0xD8" # capital Sha + 0 "\0xFD" 0 "\0xD9" # capital Shcha + 0 "\0xFF" 0 "\0xDa" # capital hard sign (Ier) + 0 "\0xF9" 0 "\0xDb" # capital Y (Iery) + 0 "\0xF8" 0 "\0xDc" # capital soft sign Ierik + 0 "\0xFC" 0 "\0xDd" # capital reverse round E + 0 "\0xE0" 0 "\0xDe" # capital Yu + 0 "\0xF1" 0 "\0xDf" # capital Ya + 0 "\0xC1" 0 "\0xE0" # small a + 0 "\0xC2" 0 "\0xE1" # small be + 0 "\0xD7" 0 "\0xE2" # small ve + 0 "\0xC7" 0 "\0xE3" # small ghe + 0 "\0xC4" 0 "\0xE4" # small de + 0 "\0xC5" 0 "\0xE5" # small ie + 0 "\0xD6" 0 "\0xE6" # small zhe + 0 "\0xDA" 0 "\0xE7" # small z + 0 "\0xC9" 0 "\0xE8" # small i + 0 "\0xCA" 0 "\0xE9" # small short i + 0 "\0xCB" 0 "\0xEa" # small ka + 0 "\0xCC" 0 "\0xEb" # small el + 0 "\0xCD" 0 "\0xEc" # small em + 0 "\0xCE" 0 "\0xEd" # small en + 0 "\0xCF" 0 "\0xEe" # small o + 0 "\0xD0" 0 "\0xEf" # small pe + 0 "\0xD2" 0 "\0xF0" # small er + 0 "\0xD3" 0 "\0xF1" # small es + 0 "\0xD4" 0 "\0xF2" # small te + 0 "\0xD5" 0 "\0xF3" # small u + 0 "\0xC6" 0 "\0xF4" # small ef + 0 "\0xC8" 0 "\0xF5" # small kha + 0 "\0xC3" 0 "\0xF6" # small tse + 0 "\0xDE" 0 "\0xF7" # small che + 0 "\0xDB" 0 "\0xF8" # small sha + 0 "\0xDD" 0 "\0xF9" # small shcha + 0 "\0xDF" 0 "\0xFa" # small hard sign (ier) + 0 "\0xD9" 0 "\0xFb" # small y (iery) + 0 "\0xD8" 0 "\0xFc" # small soft sign (ierik) + 0 "\0xDC" 0 "\0xFd" # small reverse rounded e + 0 "\0xC0" 0 "\0xFe" # small yu + 0 "\0xD1" 0 "\0xFf" # small ya diff --git a/support/translit/k8-tavtt.rus b/support/translit/k8-tavtt.rus new file mode 100644 index 0000000000..0ada1583d4 --- /dev/null +++ b/support/translit/k8-tavtt.rus @@ -0,0 +1,140 @@ +# David Crawford, 71553.1200@compuserve.com, 10 Feb 1994 +# file k8-tavtt.rus +# Adapted from Jan Labanowski files + +# This is a transliteration table for converting from KOI8 (RELCOM, GOST +# 19768-74, etc) to the character mapping used by Bill Tavolga's cyrillic +# truetype font. Tavolga's font maps cyrillic characters to the GOST +# keyboard layout. After transliteration, the output text file may be +# loaded into Word for Windows or any other editor capable of displaying +# text in a selected truetype font. + +# This will work best for KOI-8 files with no roman alfa characters, since +# all punctuation is remapped to character values that don't match ASCII. + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + 0 # number of input SHIFT sequences, only one set of output characters + + 0 # number of output SHIFT sequences, only one set of input characters + +# conversion table + +# inp_set_numb inp_seq out_set_numb out_seq + +# Remap punctuation in a compromising manner + 0 "!" 0 "@" #exclamation + 0 "\0x22" 0 "$" #quote to upper quote + 0 "#" 0 "\0xA7" #pound to numero + 0 "$" 0 " " #dollar to space + 0 "%" 0 " " #percent to space + 0 "&" 0 " " #ampersand to space + 0 "\0x27" 0 "\0x98" #apostrophe + 0 "(" 0 "(" #left paren + 0 ")" 0 ")" #right paren + 0 "*" 0 "\0xA1" #asterisk + 0 "+" 0 "~" #plus + 0 "," 0 "-" #comma + 0 "-" 0 "_" #en dash + 0 "." 0 "=" #period + 0 "/" 0 "#" #foreslash + 0 [0-9] 0 [0-9] #numbers same + 0 ":" 0 "%" #colon + 0 ";" 0 "+" #semicolon + 0 "<" 0 "^" #lt to left guillemet + 0 "=" 0 "`" #equals + 0 ">" 0 "&" #gt to right guillemet + 0 "?" 0 "*" #question mark + 0 "@" 0 " " #at to space + 0 [A-Z] 0 [A-Z] #pass alfa chars w/screwed up punctuation + 0 "[" 0 "(" #left bracket to left paren + 0 "\" 0 "\" #backslash + 0 "]" 0 ")" #right bracket to right paren + 0 "^" 0 " " #caret to space + 0 "_" 0 "!" #underscore + 0 "`" 0 "\0x98" #back apostrophe to apostrophe + 0 [a-z] 0 [a-z] #pass alfa chars w/ screwed up punctuation + 0 "{" 0 "(" #left brace to left paren + 0 "|" 0 "|" #pipe + 0 "}" 0 ")" #right brace to right paren + 0 "~" 0 " " #tilde to space +# Russian letters + 0 "\0xA3" 0 "/" #small yo + 0 "\0xB3" 0 "?" #capital YO + 0 "\0xE1" 0 "F" #capital A + 0 "\0xE2" 0 "<" #capital Be + 0 "\0xF7" 0 "D" #capital Ve + 0 "\0xE7" 0 "U" #capital Ghe + 0 "\0xE4" 0 "L" #capital De + 0 "\0xE5" 0 "T" #capital Ie + 0 "\0xF6" 0 ":" #capital Zhe + 0 "\0xFA" 0 "P" #capital Ze + 0 "\0xE9" 0 "B" #capital I + 0 "\0xEA" 0 "Q" #capital short I + 0 "\0xEB" 0 "R" #capital Ka + 0 "\0xEC" 0 "K" #capital El + 0 "\0xED" 0 "V" #capital Em + 0 "\0xEE" 0 "Y" #capital En + 0 "\0xEF" 0 "J" #capital O + 0 "\0xF0" 0 "G" #capital Pe + 0 "\0xF2" 0 "H" #capital Er + 0 "\0xF3" 0 "C" #capital Es + 0 "\0xF4" 0 "N" #capital Te + 0 "\0xF5" 0 "E" #capital U + 0 "\0xE6" 0 "A" #capital Ef + 0 "\0xE8" 0 "{" #capital Kha + 0 "\0xE3" 0 "W" #capital Tse + 0 "\0xFE" 0 "X" #capital Che + 0 "\0xFB" 0 "I" #capital Sha + 0 "\0xFD" 0 "O" #capital Shcha + 0 "\0xFF" 0 "}" #capital hard sign (Ier) + 0 "\0xF9" 0 "S" #capital Y (Iery) + 0 "\0xF8" 0 "M" #capit soft sign(Ierik) + 0 "\0xFC" 0 "\0x22" #capit reverse rounded E + 0 "\0xE0" 0 ">" #capital Yu + 0 "\0xF1" 0 "Z" #capital Ya + 0 "\0xC1" 0 "f" #small a + 0 "\0xC2" 0 "," #small be + 0 "\0xD7" 0 "d" #small ve + 0 "\0xC7" 0 "u" #small ghe + 0 "\0xC4" 0 "l" #small de + 0 "\0xC5" 0 "t" #small ie + 0 "\0xD6" 0 ";" #small zhe + 0 "\0xDA" 0 "p" #small z + 0 "\0xC9" 0 "b" #small i + 0 "\0xCA" 0 "q" #small short i + 0 "\0xCB" 0 "r" #small ka + 0 "\0xCC" 0 "k" #small el + 0 "\0xCD" 0 "v" #small em + 0 "\0xCE" 0 "y" #small en + 0 "\0xCF" 0 "j" #small o + 0 "\0xD0" 0 "g" #small pe + 0 "\0xD2" 0 "h" #small er + 0 "\0xD3" 0 "c" #small es + 0 "\0xD4" 0 "n" #small te + 0 "\0xD5" 0 "e" #small u + 0 "\0xC6" 0 "a" #small ef + 0 "\0xC8" 0 "[" #small kha + 0 "\0xC3" 0 "w" #small tse + 0 "\0xDE" 0 "x" #small che + 0 "\0xDB" 0 "i" #small sha + 0 "\0xDD" 0 "o" #small shcha + 0 "\0xDF" 0 "]" #small hard sign (ier) + 0 "\0xD9" 0 "s" #small y (iery) + 0 "\0xD8" 0 "m" #small soft sign (ierik) + 0 "\0xDC" 0 "\0x27" #small rev rounded e + 0 "\0xC0" 0 "." #small yu + 0 "\0xD1" 0 "z" #small ya diff --git a/support/translit/koi7-8.rus b/support/translit/koi7-8.rus new file mode 100644 index 0000000000..93ca6dc9de --- /dev/null +++ b/support/translit/koi7-8.rus @@ -0,0 +1,141 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi7_8.rus + +# This is a transliteration data file for converting from KOI7 to +# KOI8 (RELCOM-GOST 19768-74). The KOI7 character codes for Russian letters +# overlap with Latin letters. To mark what is in Russian and what in English, +# The SHIFT-OUT and SHIFT-IN characters are used: The SHIFT-OUT and SHIFT-IN +# switch between Latin and Russian character set. The SHIFT-OUT switches +# to Russian letters. If the sequence of Russian characters does not start +# with the SHIFT-OUT character, it will be treated as English text! +# The SHIFT-OUT character is CTRL-N (\14 = \0x0E = \0o16). +# The SHIFT-IN character is CTRL-O (\15 = \0x0F = \0o17). It switches back to +# Latin characters. +# If the SHIFT-OUT character is not present, whole file is assumed to be +# written in Latin alphabet. +# On the practical side: The KOI7 characters are frequently obtained +# from KOI8 character set as a result of transmission through the network. +# In most cases, the electronic-mail strips the 8th bit of KOI8 character +# set changing it to KOI7. The problem is that in this case, there is no +# SHIFT-IN and SHIFT-OUT codes to signal which characters are Latin and +# which are Russian. In this case, buy using the editor, YOU HAVE TO ENCLOSE +# RUSSIAN TEXT inside the appropriate SHIFT-OUT and SHIFT-IN sequence. +# To obtain a true KOI7 file, these should be CTRL-N and CTRL-O, respectively. +# However, It is sometimes difficult to obtain this control characters within +# an editor. In this case, you may use your own character, but they should +# not apear elsewhere in the text. Unfortunately, most "good" characters +# are taken. I think that it is better to use a two-character sequence in +# this situation. You are free to use your own, but I would suggest that you +# stick with {{ (as SHIFT-OUT) and }} as SHIFT-IN (they correspoind to: +# sh-sh and shch-shch in KOI7). Of course, if they appear in your KOI7 +# text you need to use something else. To use these characters, you need to +# make following changes in the section of this file where input SHIFT-OUT/IN +# sequences are read in: +# 1) uncomment (i.e., delete # character in the first column): +# # "{{" "" "" "" "}}" "" # Russian letters {{...}} +# 2) comment (i.e., put # in the first column) +# "\0x0E" "" "" "" "\0x0F" "" # Russian letters ^N...^O + + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 2 # number of input SHIFT sequences, only one set of input characters + "" "" "" "" "" "" # Latin characters + "\0x0E" "" "" "" "\0x0F" "" # Russian letters ^N...^O +# "{{" "" "" "" "}}" "" # Russian letters {{...}} + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# ASCII characters (set 1) no-change +# Russian letters have to be entered explicitly (we could use a simple +# range like: +# 2 [#$"@-~] 0 [\0xA3\0xB3\0xFF\0xC0-\0xFE] +# but then we would miss the nice table for the humans). + +# inp_set_numb inp_seq out_set_numb out_seq + 1 [\0x21-\0x7F] 0 [\0x21-\0x7F] #Pass ASCII, no change + +# Leave the " as a quote if it is at the beginning or end of the word +# Change it to hard sign only if it is inside the word +2 {([][\0x7d{A-Za-z\|~@'/])\0x22([][\0x7d{A-Za-z\|~@'/])} + -1 {\1\0xFF\2} # hard sign + 2 "#" 0 "\0xA3" #small yo + 2 "$" 0 "\0xB3" #capital YO + 2 "a" 0 "\0xE1" #capital A + 2 "b" 0 "\0xE2" #capital Be + 2 "w" 0 "\0xF7" #capital Ve + 2 "g" 0 "\0xE7" #capital Ghe + 2 "d" 0 "\0xE4" #capital De + 2 "e" 0 "\0xE5" #capital Ie + 2 "v" 0 "\0xF6" #capital Zhe + 2 "z" 0 "\0xFA" #capital Ze + 2 "i" 0 "\0xE9" #capital I + 2 "j" 0 "\0xEA" #capital short I + 2 "k" 0 "\0xEB" #capital Ka + 2 "l" 0 "\0xEC" #capital El + 2 "m" 0 "\0xED" #capital Em + 2 "n" 0 "\0xEE" #capital En + 2 "o" 0 "\0xEF" #capital O + 2 "p" 0 "\0xF0" #capital Pe + 2 "r" 0 "\0xF2" #capital Er + 2 "s" 0 "\0xF3" #capital Es + 2 "t" 0 "\0xF4" #capital Te + 2 "u" 0 "\0xF5" #capital U + 2 "f" 0 "\0xE6" #capital Ef + 2 "h" 0 "\0xE8" #capital Kha + 2 "c" 0 "\0xE3" #capital Tse + 2 "~" 0 "\0xFE" #capital Che + 2 "{" 0 "\0xFB" #capital Sha + 2 "}" 0 "\0xFD" #capital Shcha + 2 "y" 0 "\0xF9" #capital Y (Iery) + 2 "x" 0 "\0xF8" #capit soft sign(Ierik) + 2 "|" 0 "\0xFC" #capit reverse rounded E + 2 "`" 0 "\0xE0" #capital Yu + 2 "q" 0 "\0xF1" #capital Ya + 2 "A" 0 "\0xC1" #small a + 2 "B" 0 "\0xC2" #small be + 2 "W" 0 "\0xD7" #small ve + 2 "G" 0 "\0xC7" #small ghe + 2 "D" 0 "\0xC4" #small de + 2 "E" 0 "\0xC5" #small ie + 2 "V" 0 "\0xD6" #small zhe + 2 "Z" 0 "\0xDA" #small z + 2 "I" 0 "\0xC9" #small i + 2 "J" 0 "\0xCA" #small short i + 2 "K" 0 "\0xCB" #small ka + 2 "L" 0 "\0xCC" #small el + 2 "M" 0 "\0xCD" #small em + 2 "N" 0 "\0xCE" #small en + 2 "O" 0 "\0xCF" #small o + 2 "P" 0 "\0xD0" #small pe + 2 "R" 0 "\0xD2" #small er + 2 "S" 0 "\0xD3" #small es + 2 "T" 0 "\0xD4" #small te + 2 "U" 0 "\0xD5" #small u + 2 "F" 0 "\0xC6" #small ef + 2 "H" 0 "\0xC8" #small kha + 2 "C" 0 "\0xC3" #small tse + 2 "^" 0 "\0xDE" #small che + 2 "[" 0 "\0xDB" #small sha + 2 "]" 0 "\0xDD" #small shcha + 2 "_" 0 "\0xDF" #small hard sign (ier) + 2 "Y" 0 "\0xD9" #small y (iery) + 2 "X" 0 "\0xD8" #small soft sign (ierik) + 2 "\" 0 "\0xDC" #small rev rounded e + 2 "@" 0 "\0xC0" #small yu + 2 "Q" 0 "\0xD1" #small ya diff --git a/support/translit/koi7nl-8.rus b/support/translit/koi7nl-8.rus new file mode 100644 index 0000000000..d23d21e84f --- /dev/null +++ b/support/translit/koi7nl-8.rus @@ -0,0 +1,99 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi7nl_8.rus + +# This is a transliteration data file for converting from KOI7 to +# KOI8 (RELCOM-GOST 19768-74). The KOI7 character codes for Russian letters +# overlap with Latin letters. This file assumes that there are no Latin +# letters in the file (i.e., file is entirely in Russian). + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table + +# inp_set_numb inp_seq out_set_numb out_seq +# Leave the " as a quote if it is at the beginning or end of the word +# Change it to hard sign only if it is inside the word +0 {([][\0x7d{A-Za-z\|~@'/])\0x22([][\0x7d{A-Za-z\|~@'/])} + -1 {\1\0xFF\2} # hard sign + 0 "#" 0 "\0xA3" #small yo + 0 "$" 0 "\0xB3" #capital YO + 0 "a" 0 "\0xE1" #capital A + 0 "b" 0 "\0xE2" #capital Be + 0 "w" 0 "\0xF7" #capital Ve + 0 "g" 0 "\0xE7" #capital Ghe + 0 "d" 0 "\0xE4" #capital De + 0 "e" 0 "\0xE5" #capital Ie + 0 "v" 0 "\0xF6" #capital Zhe + 0 "z" 0 "\0xFA" #capital Ze + 0 "i" 0 "\0xE9" #capital I + 0 "j" 0 "\0xEA" #capital short I + 0 "k" 0 "\0xEB" #capital Ka + 0 "l" 0 "\0xEC" #capital El + 0 "m" 0 "\0xED" #capital Em + 0 "n" 0 "\0xEE" #capital En + 0 "o" 0 "\0xEF" #capital O + 0 "p" 0 "\0xF0" #capital Pe + 0 "r" 0 "\0xF2" #capital Er + 0 "s" 0 "\0xF3" #capital Es + 0 "t" 0 "\0xF4" #capital Te + 0 "u" 0 "\0xF5" #capital U + 0 "f" 0 "\0xE6" #capital Ef + 0 "h" 0 "\0xE8" #capital Kha + 0 "c" 0 "\0xE3" #capital Tse + 0 "~" 0 "\0xFE" #capital Che + 0 "{" 0 "\0xFB" #capital Sha + 0 "}" 0 "\0xFD" #capital Shcha + 0 "y" 0 "\0xF9" #capital Y (Iery) + 0 "x" 0 "\0xF8" #capit soft sign(Ierik) + 0 "|" 0 "\0xFC" #capit reverse rounded E + 0 "`" 0 "\0xE0" #capital Yu + 0 "q" 0 "\0xF1" #capital Ya + 0 "A" 0 "\0xC1" #small a + 0 "B" 0 "\0xC2" #small be + 0 "W" 0 "\0xD7" #small ve + 0 "G" 0 "\0xC7" #small ghe + 0 "D" 0 "\0xC4" #small de + 0 "E" 0 "\0xC5" #small ie + 0 "V" 0 "\0xD6" #small zhe + 0 "Z" 0 "\0xDA" #small z + 0 "I" 0 "\0xC9" #small i + 0 "J" 0 "\0xCA" #small short i + 0 "K" 0 "\0xCB" #small ka + 0 "L" 0 "\0xCC" #small el + 0 "M" 0 "\0xCD" #small em + 0 "N" 0 "\0xCE" #small en + 0 "O" 0 "\0xCF" #small o + 0 "P" 0 "\0xD0" #small pe + 0 "R" 0 "\0xD2" #small er + 0 "S" 0 "\0xD3" #small es + 0 "T" 0 "\0xD4" #small te + 0 "U" 0 "\0xD5" #small u + 0 "F" 0 "\0xC6" #small ef + 0 "H" 0 "\0xC8" #small kha + 0 "C" 0 "\0xC3" #small tse + 0 "^" 0 "\0xDE" #small che + 0 "[" 0 "\0xDB" #small sha + 0 "]" 0 "\0xDD" #small shcha + 0 "_" 0 "\0xDF" #small hard sign (ier) + 0 "Y" 0 "\0xD9" #small y (iery) + 0 "X" 0 "\0xD8" #small soft sign (ierik) + 0 "\" 0 "\0xDC" #small rev rounded e + 0 "@" 0 "\0xC0" #small yu + 0 "Q" 0 "\0xD1" #small ya diff --git a/support/translit/koi8-7.rus b/support/translit/koi8-7.rus new file mode 100644 index 0000000000..8a5c737ea0 --- /dev/null +++ b/support/translit/koi8-7.rus @@ -0,0 +1,120 @@ +# Jan Labanowski, jkl@osc.edu, Jan 10, 1993 +# File koi8_7.rus + +# This is a transliteration data file for converting from KOI8 (RELCOM, +# GOST 19768-74) to KOI7. The KOI7 character codes for Russian letters +# overlap with Latin letters. To mark what is in Russian and what in English, +# The SHIFT-OUT and SHIFT-IN characters are used. The SHIFT-OUT and SHIFT-IN +# switch between Latin and Russian character set. The SHIFT-OUT switches +# to Russian letters. +# The SHIFT-OUT character is CTRL-N (\14 = \0x0E = \0o16). +# The SHIFT-IN character is CTRL-O (\15 = \0x0F = \0o17). It switches back to +# Latin characters. You might want to read comments in file koi7_8.rus +# + +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + 0 # number of input SHIFT sequences, only one set of output characters + + 2 # number of output SHIFT sequences, only one set of input characters + "" "" # Latin characters + "\0x0E" "\0x0F" # Russian letters ^N...^O +# "{{" "}}" # Russian letters {{...}} + + +# conversion table +# ASCII characters (set 1) no-change +# Russian letters could be given as a range like: +# 0 [\0xA3\0xB3\0xFF\0xC0-\0xFE] 2 [#$"@-~] +# but then we would miss the nice table for the humans + + +# inp_set_numb inp_seq out_set_numb out_seq + +# This line is given here so the appropriate SHIFT-OUT/IN sequences are +# sent to output. Note that it does not include control characters, spaces +# digits, punctuation, etc., which can appear in both sets (at least this +# is my understanding). + + 0 [#$"@-~] 1 [#$"@-~] #Pass ASCII, no change + +# Russian letters + 0 "\0xA3" 2 "#" #small yo + 0 "\0xB3" 2 "$" #capital YO + 0 "\0xE1" 2 "a" #capital A + 0 "\0xE2" 2 "b" #capital Be + 0 "\0xF7" 2 "w" #capital Ve + 0 "\0xE7" 2 "g" #capital Ghe + 0 "\0xE4" 2 "d" #capital De + 0 "\0xE5" 2 "e" #capital Ie + 0 "\0xF6" 2 "v" #capital Zhe + 0 "\0xFA" 2 "z" #capital Ze + 0 "\0xE9" 2 "i" #capital I + 0 "\0xEA" 2 "j" #capital short I + 0 "\0xEB" 2 "k" #capital Ka + 0 "\0xEC" 2 "l" #capital El + 0 "\0xED" 2 "m" #capital Em + 0 "\0xEE" 2 "n" #capital En + 0 "\0xEF" 2 "o" #capital O + 0 "\0xF0" 2 "p" #capital Pe + 0 "\0xF2" 2 "r" #capital Er + 0 "\0xF3" 2 "s" #capital Es + 0 "\0xF4" 2 "t" #capital Te + 0 "\0xF5" 2 "u" #capital U + 0 "\0xE6" 2 "f" #capital Ef + 0 "\0xE8" 2 "h" #capital Kha + 0 "\0xE3" 2 "c" #capital Tse + 0 "\0xFE" 2 "~" #capital Che + 0 "\0xFB" 2 "{" #capital Sha + 0 "\0xFD" 2 "}" #capital Shcha + 0 "\0xFF" 2 "\0x22" #capital hard sign (Ier) + 0 "\0xF9" 2 "y" #capital Y (Iery) + 0 "\0xF8" 2 "x" #capit soft sign(Ierik) + 0 "\0xFC" 2 "|" #capit reverse rounded E + 0 "\0xE0" 2 "`" #capital Yu + 0 "\0xF1" 2 "q" #capital Ya + 0 "\0xC1" 2 "A" #small a + 0 "\0xC2" 2 "B" #small be + 0 "\0xD7" 2 "W" #small ve + 0 "\0xC7" 2 "G" #small ghe + 0 "\0xC4" 2 "D" #small de + 0 "\0xC5" 2 "E" #small ie + 0 "\0xD6" 2 "V" #small zhe + 0 "\0xDA" 2 "Z" #small z + 0 "\0xC9" 2 "I" #small i + 0 "\0xCA" 2 "J" #small short i + 0 "\0xCB" 2 "K" #small ka + 0 "\0xCC" 2 "L" #small el + 0 "\0xCD" 2 "M" #small em + 0 "\0xCE" 2 "N" #small en + 0 "\0xCF" 2 "O" #small o + 0 "\0xD0" 2 "P" #small pe + 0 "\0xD2" 2 "R" #small er + 0 "\0xD3" 2 "S" #small es + 0 "\0xD4" 2 "T" #small te + 0 "\0xD5" 2 "U" #small u + 0 "\0xC6" 2 "F" #small ef + 0 "\0xC8" 2 "H" #small kha + 0 "\0xC3" 2 "C" #small tse + 0 "\0xDE" 2 "^" #small che + 0 "\0xDB" 2 "[" #small sha + 0 "\0xDD" 2 "]" #small shcha + 0 "\0xDF" 2 "_" #small hard sign (ier) + 0 "\0xD9" 2 "Y" #small y (iery) + 0 "\0xD8" 2 "X" #small soft sign (ierik) + 0 "\0xDC" 2 "\" #small rev rounded e + 0 "\0xC0" 2 "@" #small yu + 0 "\0xD1" 2 "Q" #small ya diff --git a/support/translit/koi8-alt.rus b/support/translit/koi8-alt.rus new file mode 100644 index 0000000000..667cbf897a --- /dev/null +++ b/support/translit/koi8-alt.rus @@ -0,0 +1,97 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi8_alt.rus +# added a cludge for << and >> on May 9, 1994 + +# This is a transliteration data file for converting from KOI8 +# KOI8 is meant to be GOST 19768-74, to ALT (Bryabrins alternativnyj variant) +# To be used with translit.c program by Jan Labanowski + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "<<" 0 "\0xf3" # openning quote + 0 ">>" 0 "\0xf4" # closing quote + 0 "\0xB3" 0 "\0xf0" # capital Yo + 0 "\0xA3" 0 "\0xf1" # small yo + 0 "\0xE1" 0 "\0x80" # capital A + 0 "\0xE2" 0 "\0x81" # capital Be + 0 "\0xF7" 0 "\0x82" # capital Ve + 0 "\0xE7" 0 "\0x83" # capital Ghe + 0 "\0xE4" 0 "\0x84" # capital De + 0 "\0xE5" 0 "\0x85" # capital Ie + 0 "\0xF6" 0 "\0x86" # capital Zhe + 0 "\0xFA" 0 "\0x87" # capital Ze + 0 "\0xE9" 0 "\0x88" # capital I + 0 "\0xEA" 0 "\0x89" # capital short I + 0 "\0xEB" 0 "\0x8a" # capital Ka + 0 "\0xEC" 0 "\0x8b" # capital El + 0 "\0xED" 0 "\0x8c" # capital Em + 0 "\0xEE" 0 "\0x8d" # capital En + 0 "\0xEF" 0 "\0x8e" # capital O + 0 "\0xF0" 0 "\0x8f" # capital Pe + 0 "\0xF2" 0 "\0x90" # capital Er + 0 "\0xF3" 0 "\0x91" # capital Es + 0 "\0xF4" 0 "\0x92" # capital Te + 0 "\0xF5" 0 "\0x93" # capital U + 0 "\0xE6" 0 "\0x94" # capital Ef + 0 "\0xE8" 0 "\0x95" # capital Kha + 0 "\0xE3" 0 "\0x96" # capital Tse + 0 "\0xFE" 0 "\0x97" # capital Che + 0 "\0xFB" 0 "\0x98" # capital Sha + 0 "\0xFD" 0 "\0x99" # capital Shcha + 0 "\0xFF" 0 "\0x9a" # capital hard sign (Ier) + 0 "\0xF9" 0 "\0x9b" # capital Y (Iery) + 0 "\0xF8" 0 "\0x9c" # capital soft sign Ierik + 0 "\0xFC" 0 "\0x9d" # capital reverse round E + 0 "\0xE0" 0 "\0x9e" # capital Yu + 0 "\0xF1" 0 "\0x9f" # capital Ya + 0 "\0xC1" 0 "\0xa0" # small a + 0 "\0xC2" 0 "\0xa1" # small be + 0 "\0xD7" 0 "\0xa2" # small ve + 0 "\0xC7" 0 "\0xa3" # small ghe + 0 "\0xC4" 0 "\0xa4" # small de + 0 "\0xC5" 0 "\0xa5" # small ie + 0 "\0xD6" 0 "\0xa6" # small zhe + 0 "\0xDA" 0 "\0xa7" # small z + 0 "\0xC9" 0 "\0xa8" # small i + 0 "\0xCA" 0 "\0xa9" # small short i + 0 "\0xCB" 0 "\0xaa" # small ka + 0 "\0xCC" 0 "\0xab" # small el + 0 "\0xCD" 0 "\0xac" # small em + 0 "\0xCE" 0 "\0xad" # small en + 0 "\0xCF" 0 "\0xae" # small o + 0 "\0xD0" 0 "\0xaf" # small pe + 0 "\0xD2" 0 "\0xe0" # small er + 0 "\0xD3" 0 "\0xe1" # small es + 0 "\0xD4" 0 "\0xe2" # small te + 0 "\0xD5" 0 "\0xe3" # small u + 0 "\0xC6" 0 "\0xe4" # small ef + 0 "\0xC8" 0 "\0xe5" # small kha + 0 "\0xC3" 0 "\0xe6" # small tse + 0 "\0xDE" 0 "\0xe7" # small che + 0 "\0xDB" 0 "\0xe8" # small sha + 0 "\0xDD" 0 "\0xe9" # small shcha + 0 "\0xDF" 0 "\0xea" # small hard sign (ier) + 0 "\0xD9" 0 "\0xeb" # small y (iery) + 0 "\0xD8" 0 "\0xec" # small soft sign (ierik) + 0 "\0xDC" 0 "\0xed" # small reverse rounded e + 0 "\0xC0" 0 "\0xee" # small yu + 0 "\0xD1" 0 "\0xef" # small ya diff --git a/support/translit/koi8-gos.rus b/support/translit/koi8-gos.rus new file mode 100644 index 0000000000..c1dd431da2 --- /dev/null +++ b/support/translit/koi8-gos.rus @@ -0,0 +1,93 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi8_gos.rus + +# This is a transliteration data file for converting from KOI8 (Relcom) +# KOI8 is meant to be GOST 19768-74, to GOSTSCII 84 (approx. ISO-8859-5) +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xB3" 0 "\0xF0 #capital Yo + 0 "\0xA3" 0 "\0xF1" #small yo + 0 "\0xE1" 0 "\0xB0" #capital A + 0 "\0xE2" 0 "\0xB1" #capital Be + 0 "\0xF7" 0 "\0xB2" #capital Ve + 0 "\0xE7" 0 "\0xB3" #capital Ghe + 0 "\0xE4" 0 "\0xB4" #capital De + 0 "\0xE5" 0 "\0xB5" #capital Ie + 0 "\0xF6" 0 "\0xB6" #capital Zhe + 0 "\0xFA" 0 "\0xB7" #capital Ze + 0 "\0xE9" 0 "\0xB8" #capital I + 0 "\0xEA" 0 "\0xB9" #capital short I + 0 "\0xEB" 0 "\0xBA" #capital Ka + 0 "\0xEC" 0 "\0xBB" #capital El + 0 "\0xED" 0 "\0xBC" #capital Em + 0 "\0xEE" 0 "\0xBD" #capital En + 0 "\0xEF" 0 "\0xBE" #capital O + 0 "\0xF0" 0 "\0xBF" #capital Pe + 0 "\0xF2" 0 "\0xC0" #capital Er + 0 "\0xF3" 0 "\0xC1" #capital Es + 0 "\0xF4" 0 "\0xC2" #capital Te + 0 "\0xF5" 0 "\0xC3" #capital U + 0 "\0xE6" 0 "\0xC4" #capital Ef + 0 "\0xE8" 0 "\0xC5" #capital Kha + 0 "\0xE3" 0 "\0xC6" #capital Tse + 0 "\0xFE" 0 "\0xC7" #capital Che + 0 "\0xFB" 0 "\0xC8" #capital Sha + 0 "\0xFD" 0 "\0xC9" #capital Shcha + 0 "\0xFF" 0 "\0xCA" #capital hard sign (Ier) + 0 "\0xF9" 0 "\0xCB" #capital Y (Iery) + 0 "\0xF8" 0 "\0xCC" #capit soft sign(Ierik) + 0 "\0xFC" 0 "\0xCD" #capit reverse rounded E + 0 "\0xE0" 0 "\0xCE" #capital Yu + 0 "\0xF1" 0 "\0xCF" #capital Ya + 0 "\0xC1" 0 "\0xD0" #small a + 0 "\0xC2" 0 "\0xD1" #small be + 0 "\0xD7" 0 "\0xD2" #small ve + 0 "\0xC7" 0 "\0xD3" #small ghe + 0 "\0xC4" 0 "\0xD4" #small de + 0 "\0xC5" 0 "\0xD5" #small ie + 0 "\0xD6" 0 "\0xD6" #small zhe + 0 "\0xDA" 0 "\0xD7" #small z + 0 "\0xC9" 0 "\0xD8" #small i + 0 "\0xCA" 0 "\0xD9" #small short i + 0 "\0xCB" 0 "\0xDA" #small ka + 0 "\0xCC" 0 "\0xDB" #small el + 0 "\0xCD" 0 "\0xDC" #small em + 0 "\0xCE" 0 "\0xDD" #small en + 0 "\0xCF" 0 "\0xDE" #small o + 0 "\0xD0" 0 "\0xDF" #small pe + 0 "\0xD2" 0 "\0xE0" #small er + 0 "\0xD3" 0 "\0xE1" #small es + 0 "\0xD4" 0 "\0xE2" #small te + 0 "\0xD5" 0 "\0xE3" #small u + 0 "\0xC6" 0 "\0xE4" #small ef + 0 "\0xC8" 0 "\0xE5" #small kha + 0 "\0xC3" 0 "\0xE6" #small tse + 0 "\0xDE" 0 "\0xE7" #small che + 0 "\0xDB" 0 "\0xE8" #small sha + 0 "\0xDD" 0 "\0xE9" #small shcha + 0 "\0xDF" 0 "\0xEA" #small hard sign (ier) + 0 "\0xD9" 0 "\0xEB" #small y (iery) + 0 "\0xD8" 0 "\0xEC" #small soft sign (ierik) + 0 "\0xDC" 0 "\0xED" #small rev rounded e + 0 "\0xC0" 0 "\0xEE" #small yu + 0 "\0xD1" 0 "\0xEF" #small ya diff --git a/support/translit/koi8-lc.rus b/support/translit/koi8-lc.rus new file mode 100644 index 0000000000..bb02650961 --- /dev/null +++ b/support/translit/koi8-lc.rus @@ -0,0 +1,109 @@ +# Jan Labanowski, jkl@osc.edu, Jan. 10, 1992 +# File koi8-lc.dat + +# This is a transliteration data file for converting from KOI-8 as used +# by RELCOM (GOST 19768-74) to approximate Library of Congress (phonetic) +# transliteration. I personally think, that LC transliteration is a bad one. +# It is not possible to exactly represent Library of Congress transliteration +# since it uses the accented letters which are not present in the ASCII +# character set. Several changes are made to the letter of LC. +# The English text has to be embraced in braces {}, while +# the Russian one, is outside the braces. +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documentation. + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + + +#starting sequence for LaTeX +"" + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 2 # number of output SHIFT sequences, two sets of input characters + +# SHIFT-OUT SHIFT-IN + "" "" #cyrillic enclosed in {\cyr ... } + "{" "}" #shift sequences for Latin + +# conversion table +# inp_set inp_seq out_set out_seq + +# Latin(ASCII) embrace it in {} + 0 ["'A-Za-z] 2 ["'A-Za-z] + +# Cyrillic letters + 0 "\0xA3" 1 "jo" # small jo + 0 "\0xB3" 1 "JO" # capital Jo + 0 "\0xE1" 1 "A" + 0 "\0xE2" 1 "B" + 0 "\0xF7" 1 "V" + 0 "\0xE7" 1 "G" + 0 "\0xE4" 1 "D" + 0 "\0xE5" 1 "E" + 0 "\0xF6" 1 "ZH" + 0 "\0xFA" 1 "Z" + 0 "\0xE9" 1 "I" + 0 "\0xEA" 1 "J" # I kratkoje + 0 "\0xEB" 1 "K" + 0 "\0xEC" 1 "L" + 0 "\0xED" 1 "M" + 0 "\0xEE" 1 "N" + 0 "\0xEF" 1 "O" + 0 "\0xF0" 1 "P" + 0 "\0xF2" 1 "R" + 0 "\0xF3" 1 "S" + 0 "\0xF4" 1 "T" + 0 "\0xF5" 1 "U" + 0 "\0xE6" 1 "F" + 0 "\0xE8" 1 "KH" + 0 "\0xE3" 1 "C" + 0 "\0xFE" 1 "Ch" + 0 "\0xFB" 1 "Sh" + 0 "\0xFD" 1 "Shch" + 0 "\0xFF" 1 "\0x22" # Tverdyj znak + 0 "\0xF9" 1 "Y" + 0 "\0xF8" 1 "'" # Myagkij znak + 0 "\0xFC" 1 "EH" # E oborotnoe + 0 "\0xE0" 1 "JU" + 0 "\0xF1" 1 "JA" + 0 "\0xC1" 1 "a" + 0 "\0xC2" 1 "b" + 0 "\0xD7" 1 "v" + 0 "\0xC7" 1 "g" + 0 "\0xC4" 1 "d" + 0 "\0xC5" 1 "e" + 0 "\0xD6" 1 "zh" + 0 "\0xDA" 1 "z" + 0 "\0xC9" 1 "i" + 0 "\0xCA" 1 "j" + 0 "\0xCB" 1 "k" + 0 "\0xCC" 1 "l" + 0 "\0xCD" 1 "m" + 0 "\0xCE" 1 "n" + 0 "\0xCF" 1 "o" + 0 "\0xD0" 1 "p" + 0 "\0xD2" 1 "r" + 0 "\0xD3" 1 "s" + 0 "\0xD4" 1 "t" + 0 "\0xD5" 1 "u" + 0 "\0xC6" 1 "f" + 0 "\0xC8" 1 "kh" + 0 "\0xC3" 1 "c" + 0 "\0xDE" 1 "ch" + 0 "\0xDB" 1 "sh" + 0 "\0xDD" 1 "shch" + 0 "\0xDF" 1 "\0x22" + 0 "\0xD9" 1 "y" + 0 "\0xD8" 1 "'" + 0 "\0xDC" 1 "eh" # e oborotnoe + 0 "\0xC0" 1 "ju" + 0 "\0xD1" 1 "ja" diff --git a/support/translit/koi8-ltx.rus b/support/translit/koi8-ltx.rus new file mode 100644 index 0000000000..e087fb60a8 --- /dev/null +++ b/support/translit/koi8-ltx.rus @@ -0,0 +1,200 @@ +# Jan Labanowski, jkl@osc.edu, Jan. 10, 1992 +# File koi8_ltx.dat + +# This is a transliteration data file for converting from KOI-8 as used +# by RELCOM (GOST 19768-74) to LaTeX +# The LaTeX tranliteration sequences follow AMS cyrillic convention for +# WNCYR fonts with cyracc.def file +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documentation +# Process your file through translit. For example: +# translit -i myfile.ko8 -o myfile.tex -t koi8-tex.rus +# Then process it with LaTeX by using: +# latex myfile.tex +# and then use your favorite dvi2something program. E.g., for PostScript use: +# dvips myfile.dvi +# + + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + + +# starting sequence for LaTeX (kindly contributed by Oleg Zabluda +# <zabluda@math.psu.edu> Wed May 26 22:20:38 1993 +"\documentstyle{article} +\input cyracc.def +\font\tencyr=wncyr10 +\def\cyr{\tencyr\cyracc} +\settowidth{\textwidth}{\cyr\hspace{90em}} +\pagestyle{empty} +\begin{document} +" + +#ending sequence +" +\end{document} +" + + 0 # number of input SHIFT sequences, only one set of input characters + + 2 # number of output SHIFT sequences, two sets of input characters + +# SHIFT-OUT SHIFT-IN + "" "" #shift sequences for set 1 (Latin) + "{\cyr " "}" #cyrillic enclosed in {\cyr ... } + +# conversion table +# inp_set inp_seq out_set out_seq + + +# characters which are not in ASCII (and DEL) and not in KOI8 to * + 0 [\0x7F-\0xA2\0xA4-\0xB2\0xB4-\0xBF] 0 "$\star$" + +# dehyphenate words, e.g. con- (NL)cert is changed to concert(NL) +# Below is a complicated (?) regular expression. It joins a hyphenated +# word. It looks for one of more letters (saves them as substring 1) +# followed by a hyphen (which may be followed by zero or more spaces +# or tabs). The hyphen must be followed by a NewLine (characters 0A-0D hex +# are various new line sequences) and saves NewLine sequence. Then it looks +# for zero or more tabs and spaces (at the beginning of the line). Then it +# looks for the rest of the hyphenated word and saves it as substring 3. +# The word may have punctuation attached. Then it looks again for some spaces +# or tabs. The substitute string junks all sequences which were not withn (), +# i.e., hyphen and spaces/tabs and inserts only substrings but in a different +# order. The 1 (word beginning) is followed by 3 (word end) and followed by +# the NewLine. The {\2\1\3} would be equally good. The string is then returned +# back for processing (output code is -1). Note that since input regular +# expression is very long, I chopped it into several lines by using \NL. +# If \ is followed by a white space, the \ and all white space which follow it +# is removed by the program. Be carefull not to use "\white_space" in strings, +# lists or regular expressions. If you must, enter \ as a code (i.e., \0x5C). + +# uncomment lines below if you want to dehyphenate + +# 0 {([A-Za-z\0xA3\0xB3\0xC0-\0xFF]+)-[ \0x09]*([\0x0A-\0x0D]+)[ \0x09]*(\ +# [A-Za-z\0xA3\0xB3\0xC0-\0xFF,.?;:")'`!]+)[ \0x09]} +# -1 {\1\3\2} + +# All latin letters are converted to the same letters but with the output +# set 1 + 0 [A-Za-z] 1 [A-Za-z] #Latin letters A-Z and a-z + +# Add \\ before all NewLine sequences + 0 {([\0x0B-\0x0D]*)\0x0A([\0x0B-\0x0D]*)} 0 {\\\\\1\0x0A\2} + +# Convert all double spaces to protected LaTeX spaces. Note that the +# backslash is followed by a space here, and had to be entered as its code + 0 " " 0 "{\0x5C \0x5C }" + +# Quote some special TeX characters + +# these do not require going out of {\cyr ....} + 0 "<<" 0 "<" + 0 ">>" 0 ">" + 0 "[" 0 "$[$" + 0 "]" 0 "$]$" + 0 "^" 0 "$\wedge$" + 0 "{" 0 "$\lbrace$" + 0 "}" 0 "$\rbrace$" + 0 "~" 0 "$\sim$" + 0 "\" 0 "$\backslash$" + 0 "|" 0 "$\mid$" + 0 "*" 0 "$\star$" + 0 "<" 0 "$<$" + 0 ">" 0 "$>$" + 0 "$" 0 "\$" + 0 "%" 0 "\%" + +# these can be represented correctly only in Latin charset + 0 "_" 1 "\_" + 0 "&" 1 "\&" + 0 "#" 1 "\#" + 0 "@" 1 "@" + +# Cyrillic letters + 0 "\0xF4\0xFD" 2 "T{\cydot}Shch" # to prevent C + 0 "\0xF4\0xDD" 2 "T{\cydot}shch" # to prevent C + 0 "\0xD4\0xFD" 2 "t{\cydot}Shch" # to prevent C + 0 "\0xD4\0xDD" 2 "t{\cydot}shch" # to prevent C + + 0 "\0xF4\0xFB" 2 "T{\cydot}Sh" # to prevent C + 0 "\0xF4\0xDB" 2 "T{\cydot}sh" # to prevent C + 0 "\0xD4\0xFB" 2 "t{\cydot}Sh" # to prevent C + 0 "\0xD4\0xDB" 2 "t{\cydot}sh" # to prevent C + + 0 "\0xF4\0xF3" 2 "T{\cydot}S" # to prevent C + 0 "\0xF4\0xD3" 2 "T{\cydot}s" # to prevent C + 0 "\0xD4\0xF3" 2 "t{\cydot}S" # to prevent c + 0 "\0xD4\0xD3" 2 "t{\cydot}s" # to prevent c + + 0 "\0xA3" 2 "\\0o42e" # small \"e (yo) + 0 "\0xB3" 2 "\\0o42E" # capital \"E (Yo) + 0 "\0xE1" 2 "A" + 0 "\0xE2" 2 "B" + 0 "\0xF7" 2 "V" + 0 "\0xE7" 2 "G" + 0 "\0xE4" 2 "D" + 0 "\0xE5" 2 "E" + 0 "\0xF6" 2 "Zh" + 0 "\0xFA" 2 "Z" + 0 "\0xE9" 2 "I" + 0 "\0xEA" 2 "{\u I}" # I kratkoje + 0 "\0xEB" 2 "K" + 0 "\0xEC" 2 "L" + 0 "\0xED" 2 "M" + 0 "\0xEE" 2 "N" + 0 "\0xEF" 2 "O" + 0 "\0xF0" 2 "P" + 0 "\0xF2" 2 "R" + 0 "\0xF3" 2 "S" + 0 "\0xF4" 2 "T" + 0 "\0xF5" 2 "U" + 0 "\0xE6" 2 "F" + 0 "\0xE8" 2 "Kh" + 0 "\0xE3" 2 "C" + 0 "\0xFE" 2 "Ch" + 0 "\0xFB" 2 "Sh" + 0 "\0xFD" 2 "Shch" + 0 "\0xFF" 2 "{\Cdprime}" # Tverdyj znak + 0 "\0xF9" 2 "Y" + 0 "\0xF8" 2 "{\Cprime}" # Myagkij znak + 0 "\0xFC" 2 "\`E" + 0 "\0xE0" 2 "Yu" + 0 "\0xF1" 2 "Ya" + 0 "\0xC1" 2 "a" + 0 "\0xC2" 2 "b" + 0 "\0xD7" 2 "v" + 0 "\0xC7" 2 "g" + 0 "\0xC4" 2 "d" + 0 "\0xC5" 2 "e" + 0 "\0xD6" 2 "zh" + 0 "\0xDA" 2 "z" + 0 "\0xC9" 2 "i" + 0 "\0xCA" 2 "{\u i}" + 0 "\0xCB" 2 "k" + 0 "\0xCC" 2 "l" + 0 "\0xCD" 2 "m" + 0 "\0xCE" 2 "n" + 0 "\0xCF" 2 "o" + 0 "\0xD0" 2 "p" + 0 "\0xD2" 2 "r" + 0 "\0xD3" 2 "s" + 0 "\0xD4" 2 "t" + 0 "\0xD5" 2 "u" + 0 "\0xC6" 2 "f" + 0 "\0xC8" 2 "kh" + 0 "\0xC3" 2 "c" + 0 "\0xDE" 2 "ch" + 0 "\0xDB" 2 "sh" + 0 "\0xDD" 2 "shch" + 0 "\0xDF" 2 "{\cdprime}" + 0 "\0xD9" 2 "y" + 0 "\0xD8" 2 "{\cprime}" + 0 "\0xDC" 2 "\`e" + 0 "\0xC0" 2 "yu" + 0 "\0xD1" 2 "ya" diff --git a/support/translit/koi8-phg.rus b/support/translit/koi8-phg.rus new file mode 100644 index 0000000000..cf50f9cf1a --- /dev/null +++ b/support/translit/koi8-phg.rus @@ -0,0 +1,112 @@ + +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi8-phg.rus + +# This is a transliteration data file for converting from +# KOI8 as used by RELCOM to transliteration defined in the GOST 16876-71 +# standard. +# Since I never had a chance to look at the GOST 16876-71 document, +# the actual table is based on the info which I read on some list +# (I believe it was posted by Glenn Thobe on RUS-TEX) +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences + + 2 # number of output SHIFT sequences, only one set of output characters + "" "" # russian outside brackets + "{" "}" # ascii, inside brackets + +# conversion table + +# Latin(ASCII) is embraced in {} + 0 [A-Za-z] 2 [A-Za-z] + +# White space and control characters + 0 [\0x01-\0x20] 0 [\0x01-\0x20] # spaces and controll +# punctuation and digits + 0 [\0x21-\0x26\0x28-\0x3F\0x5B-\0x5F\0x7C\0x7e] + 0 [\0x21-\0x26\0x28-\0x3F\0x5B-\0x5F\0x7C\0x7e] + + +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xE1" 1 "A" # capital A + 0 "\0xE2" 1 "B" # capital Be + 0 "\0xF7" 1 "V" # capital Ve + 0 "\0xE7" 1 "G" # capital Ghe + 0 "\0xE4" 1 "D" # capital De + 0 "\0xE5" 1 "E" # capital Je + 0 "\0xB3" 1 "JO" # capital Yo + 0 "\0xF6" 1 "ZH" # capital Zhe + 0 "\0xFA" 1 "Z" # capital Ze + 0 "\0xE9" 1 "I" # capital I + 0 "\0xEA" 1 "JJ" # capital short I + 0 "\0xEB" 1 "K" # capital Ka + 0 "\0xEC" 1 "L" # capital El + 0 "\0xED" 1 "M" # capital Em + 0 "\0xEE" 1 "N" # capital En + 0 "\0xEF" 1 "O" # capital O + 0 "\0xF0" 1 "P" # capital Pe + 0 "\0xF2" 1 "R" # capital Er + 0 "\0xF3" 1 "S" # capital Es + 0 "\0xF4" 1 "T" # capital Te + 0 "\0xF5" 1 "U" # capital U + 0 "\0xE6" 1 "F" # capital Ef + 0 "\0xE8" 1 "Kh" # capital Kha + 0 "\0xE3" 1 "C" # capital Tse + 0 "\0xFE" 1 "CH" # capital Che + 0 "\0xFB" 1 "SH" # capital Sha + 0 "\0xFD" 1 "HH" # capital Shcha + 0 "\0xFF" 1 "``" # capital hard sign (Ier) + 0 "\0xF9" 1 "Y" # capital Y (Iery) + 0 "\0xF8" 1 "`" # capital soft sign Ierik + 0 "\0xFC" 1 "EH" # capital reverse round E + 0 "\0xE0" 1 "JU" # capital Yu + 0 "\0xF1" 1 "JA" # capital Ya + + 0 "\0xC1" 1 "a" # small a + 0 "\0xC2" 1 "b" # small be + 0 "\0xD7" 1 "v" # small ve + 0 "\0xC7" 1 "g" # small ghe + 0 "\0xC4" 1 "d" # small de + 0 "\0xC5" 1 "e" # small je + 0 "\0xA3" 1 "jo" # small yo + 0 "\0xD6" 1 "zh" # small zhe + 0 "\0xDA" 1 "z" # small z + 0 "\0xC9" 1 "i" # small i + 0 "\0xCA" 1 "jj" # small short i + 0 "\0xCB" 1 "k" # small ka + 0 "\0xCC" 1 "l" # small el + 0 "\0xCD" 1 "m" # small em + 0 "\0xCE" 1 "n" # small en + 0 "\0xCF" 1 "o" # small o + 0 "\0xD0" 1 "p" # small pe + 0 "\0xD2" 1 "r" # small er + 0 "\0xD3" 1 "s" # small es + 0 "\0xD4" 1 "t" # small te + 0 "\0xD5" 1 "u" # small u + 0 "\0xC6" 1 "f" # small ef + 0 "\0xC8" 1 "kh" # small kha + 0 "\0xC3" 1 "c" # small tse + 0 "\0xDE" 1 "ch" # small che + 0 "\0xDB" 1 "sh" # small sha + 0 "\0xDD" 1 "hh" # small shcha + 0 "\0xDF" 1 "''" # small hard sign (ier) + 0 "\0xD9" 1 "y" # small y (iery) + 0 "\0xD8" 1 "'" # small soft sign (ierik) + 0 "\0xDC" 1 "eh" # small reverse rounded e + 0 "\0xC0" 1 "ju" # small yu + 0 "\0xD1" 1 "ja" # small ya diff --git a/support/translit/koi8-php.rus b/support/translit/koi8-php.rus new file mode 100644 index 0000000000..3cfed5fff6 --- /dev/null +++ b/support/translit/koi8-php.rus @@ -0,0 +1,108 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File koi8-php.rus + +# This is a transliteration data file for converting from +# KOI8 as used by RELCOM to transliteration defined as Pokrovsky EuroTex-92 +# (posted to RUSTEX by Joseph Romanovsky) +# standard. +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences + + 2 # number of output SHIFT sequences, only one set of output characters + "" "" # russian outside brackets + "{" "}" # ascii, inside brackets + +# conversion table + +# Latin(ASCII) is embraced in {} + 0 [A-Za-z] 2 [A-Za-z] + +# White space and control characters + 0 [\0x01-\0x20] 0 [\0x01-\0x20] + +# punctuation and digits + 0 [\0x21-\0x3F\0x5B-\0x60\0x7B-\0x7E] 0 [\0x21-\0x3F\0x5B-\0x60\0x7B-\0x7E] + +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xE1" 1 "A" # capital A + 0 "\0xE2" 1 "B" # capital Be + 0 "\0xF7" 1 "V" # capital Ve + 0 "\0xE7" 1 "G" # capital Ghe + 0 "\0xE4" 1 "D" # capital De + 0 "\0xE5" 1 "E" # capital Je + 0 "\0xB3" 1 "Jo" # capital Yo + 0 "\0xF6" 1 "Zh" # capital Zhe + 0 "\0xFA" 1 "Z" # capital Ze + 0 "\0xE9" 1 "I" # capital I + 0 "\0xEA" 1 "Ji" # capital short I + 0 "\0xEB" 1 "K" # capital Ka + 0 "\0xEC" 1 "L" # capital El + 0 "\0xED" 1 "M" # capital Em + 0 "\0xEE" 1 "N" # capital En + 0 "\0xEF" 1 "O" # capital O + 0 "\0xF0" 1 "P" # capital Pe + 0 "\0xF2" 1 "R" # capital Er + 0 "\0xF3" 1 "S" # capital Es + 0 "\0xF4" 1 "T" # capital Te + 0 "\0xF5" 1 "U" # capital U + 0 "\0xE6" 1 "F" # capital Ef + 0 "\0xE8" 1 "Kh" # capital Kha + 0 "\0xE3" 1 "C" # capital Tse + 0 "\0xFE" 1 "Ch" # capital Che + 0 "\0xFB" 1 "Sh" # capital Sha + 0 "\0xFD" 1 "W" # capital Shcha + 0 "\0xFF" 1 "X" # capital hard sign (Ier) + 0 "\0xF9" 1 "Y" # capital Y (Iery) + 0 "\0xF8" 1 "Q" # capital soft sign Ierik + 0 "\0xFC" 1 "Eh" # capital reverse round E + 0 "\0xE0" 1 "Ju" # capital Yu + 0 "\0xF1" 1 "Ja" # capital Ya + + 0 "\0xC1" 1 "a" # small a + 0 "\0xC2" 1 "b" # small be + 0 "\0xD7" 1 "v" # small ve + 0 "\0xC7" 1 "g" # small ghe + 0 "\0xC4" 1 "d" # small de + 0 "\0xC5" 1 "e" # small je + 0 "\0xA3" 1 "jo" # small yo + 0 "\0xD6" 1 "zh" # small zhe + 0 "\0xDA" 1 "z" # small z + 0 "\0xC9" 1 "i" # small i + 0 "\0xCA" 1 "ji" # small short i + 0 "\0xCB" 1 "k" # small ka + 0 "\0xCC" 1 "l" # small el + 0 "\0xCD" 1 "m" # small em + 0 "\0xCE" 1 "n" # small en + 0 "\0xCF" 1 "o" # small o + 0 "\0xD0" 1 "p" # small pe + 0 "\0xD2" 1 "r" # small er + 0 "\0xD3" 1 "s" # small es + 0 "\0xD4" 1 "t" # small te + 0 "\0xD5" 1 "u" # small u + 0 "\0xC6" 1 "f" # small ef + 0 "\0xC8" 1 "kh" # small kha + 0 "\0xC3" 1 "c" # small tse + 0 "\0xDE" 1 "ch" # small che + 0 "\0xDB" 1 "sh" # small sha + 0 "\0xDD" 1 "w" # small shcha + 0 "\0xDF" 1 "x" # small hard sign (ier) + 0 "\0xD9" 1 "y" # small y (iery) + 0 "\0xD8" 1 "q" # small soft sign (ierik) + 0 "\0xDC" 1 "eh" # small reverse rounded e + 0 "\0xC0" 1 "ju" # small yu + 0 "\0xD1" 1 "ja" # small ya diff --git a/support/translit/koi8-tex.rus b/support/translit/koi8-tex.rus new file mode 100644 index 0000000000..f4e22a0e82 --- /dev/null +++ b/support/translit/koi8-tex.rus @@ -0,0 +1,191 @@ +# koi8-plaintex.rus - KOI8 to PlainTeX conversion for translit +# +# version 1.0 +# +# Created by Alexander L. Belikoff, 1997 + +# The TeX tranliteration sequences follow AMS cyrillic convention for +# WNCYR fonts with cyracc.def file +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documentation +# Processed the KOI8 encoced file by translit. For example: +# translit -i myfile.ko8 -o myfile.tex -t koi8-tex.rus +# Then process it with Plain TeX by using: +# tex myfile.tex +# and then use your favorite dvi2something program. E.g., for PostScript use: +# dvips myfile.dvi +# + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + + +# starting sequence for TeX +"\input cyracc.def +\font\tencyr=wncyr10 +\def\cyr{\tencyr\cyracc} +\obeylines +\obeyspaces +" + +#ending sequence +" +\bye +" + + 0 # number of input SHIFT sequences, only one set of input characters + + 2 # number of output SHIFT sequences, two sets of input characters + +# SHIFT-OUT SHIFT-IN + "" "" #shift sequences for set 1 (Latin) + "{\cyr " "}" #cyrillic enclosed in {\cyr ... } + +# conversion table +# inp_set inp_seq out_set out_seq + + +# characters which are not in ASCII (and DEL) and not in KOI8 to * + 0 [\0x7F-\0xA2\0xA4-\0xB2\0xB4-\0xBF] 0 "$\star$" + +# dehyphenate words, e.g. con- (NL)cert is changed to concert(NL) +# Below is a complicated (?) regular expression. It joins a hyphenated +# word. It looks for one of more letters (saves them as substring 1) +# followed by a hyphen (which may be followed by zero or more spaces +# or tabs). The hyphen must be followed by a NewLine (characters 0A-0D hex +# are various new line sequences) and saves NewLine sequence. Then it looks +# for zero or more tabs and spaces (at the beginning of the line). Then it +# looks for the rest of the hyphenated word and saves it as substring 3. +# The word may have punctuation attached. Then it looks again for some spaces +# or tabs. The substitute string junks all sequences which were not withn (), +# i.e., hyphen and spaces/tabs and inserts only substrings but in a different +# order. The 1 (word beginning) is followed by 3 (word end) and followed by +# the NewLine. The {\2\1\3} would be equally good. The string is then returned +# back for processing (output code is -1). Note that since input regular +# expression is very long, I chopped it into several lines by using \NL. +# If \ is followed by a white space, the \ and all white space which follow it +# is removed by the program. Be carefull not to use "\white_space" in strings, +# lists or regular expressions. If you must, enter \ as a code (i.e., \0x5C). + +# uncomment lines below if you want to dehyphenate + +# 0 {([A-Za-z\0xA3\0xB3\0xC0-\0xFF]+)-[ \0x09]*([\0x0A-\0x0D]+)[ \0x09]*(\ +# [A-Za-z\0xA3\0xB3\0xC0-\0xFF,.?;:")'`!]+)[ \0x09]} +# -1 {\1\3\2} + +# All latin letters are converted to the same letters but with the output +# set 1 + 0 [A-Za-z] 1 [A-Za-z] #Latin letters A-Z and a-z + +# Add \medskip before the blank lines + 0 {([\0x0B-\0x0D]*)\0x0A[ \0x09]*\0x0A([\0x0B-\0x0D]*)} 0 {\\medskip\1\0x0A\2} + +# Quote some special TeX characters + +# these do not require going out of {\cyr ....} + 0 "[" 0 "$[$" + 0 "]" 0 "$]$" + 0 "^" 0 "$\wedge$" + 0 "{" 0 "$\lbrace$" + 0 "}" 0 "$\rbrace$" + 0 "~" 0 "$\sim$" + 0 "\" 0 "$\backslash$" + 0 "|" 0 "$\mid$" + 0 "*" 0 "$\star$" + 0 "<" 0 "$<$" + 0 ">" 0 "$>$" + 0 "$" 0 "\$" + 0 "%" 0 "\%" + +# these can be represented correctly only in Latin charset + 0 "_" 1 "\_" + 0 "&" 1 "\&" + 0 "#" 1 "\#" + 0 "@" 1 "@" + +# Cyrillic letters + 0 "\0xF4\0xFD" 2 "T{\cydot}Shch" # to prevent C + 0 "\0xF4\0xDD" 2 "T{\cydot}shch" # to prevent C + 0 "\0xD4\0xFD" 2 "t{\cydot}Shch" # to prevent C + 0 "\0xD4\0xDD" 2 "t{\cydot}shch" # to prevent C + + 0 "\0xF4\0xFB" 2 "T{\cydot}Sh" # to prevent C + 0 "\0xF4\0xDB" 2 "T{\cydot}sh" # to prevent C + 0 "\0xD4\0xFB" 2 "t{\cydot}Sh" # to prevent C + 0 "\0xD4\0xDB" 2 "t{\cydot}sh" # to prevent C + + 0 "\0xF4\0xF3" 2 "T{\cydot}S" # to prevent C + 0 "\0xF4\0xD3" 2 "T{\cydot}s" # to prevent C + 0 "\0xD4\0xF3" 2 "t{\cydot}S" # to prevent c + 0 "\0xD4\0xD3" 2 "t{\cydot}s" # to prevent c + + 0 "\0xA3" 2 "\\0o42e" # small \"e (yo) + 0 "\0xB3" 2 "\\0o42E" # capital \"E (Yo) + 0 "\0xE1" 2 "A" + 0 "\0xE2" 2 "B" + 0 "\0xF7" 2 "V" + 0 "\0xE7" 2 "G" + 0 "\0xE4" 2 "D" + 0 "\0xE5" 2 "E" + 0 "\0xF6" 2 "Zh" + 0 "\0xFA" 2 "Z" + 0 "\0xE9" 2 "I" + 0 "\0xEA" 2 "{\u I}" # I kratkoje + 0 "\0xEB" 2 "K" + 0 "\0xEC" 2 "L" + 0 "\0xED" 2 "M" + 0 "\0xEE" 2 "N" + 0 "\0xEF" 2 "O" + 0 "\0xF0" 2 "P" + 0 "\0xF2" 2 "R" + 0 "\0xF3" 2 "S" + 0 "\0xF4" 2 "T" + 0 "\0xF5" 2 "U" + 0 "\0xE6" 2 "F" + 0 "\0xE8" 2 "Kh" + 0 "\0xE3" 2 "C" + 0 "\0xFE" 2 "Ch" + 0 "\0xFB" 2 "Sh" + 0 "\0xFD" 2 "Shch" + 0 "\0xFF" 2 "{\Cdprime}" # Tverdyj znak + 0 "\0xF9" 2 "Y" + 0 "\0xF8" 2 "{\Cprime}" # Myagkij znak + 0 "\0xFC" 2 "\`E" + 0 "\0xE0" 2 "Yu" + 0 "\0xF1" 2 "Ya" + 0 "\0xC1" 2 "a" + 0 "\0xC2" 2 "b" + 0 "\0xD7" 2 "v" + 0 "\0xC7" 2 "g" + 0 "\0xC4" 2 "d" + 0 "\0xC5" 2 "e" + 0 "\0xD6" 2 "zh" + 0 "\0xDA" 2 "z" + 0 "\0xC9" 2 "i" + 0 "\0xCA" 2 "{\u i}" + 0 "\0xCB" 2 "k" + 0 "\0xCC" 2 "l" + 0 "\0xCD" 2 "m" + 0 "\0xCE" 2 "n" + 0 "\0xCF" 2 "o" + 0 "\0xD0" 2 "p" + 0 "\0xD2" 2 "r" + 0 "\0xD3" 2 "s" + 0 "\0xD4" 2 "t" + 0 "\0xD5" 2 "u" + 0 "\0xC6" 2 "f" + 0 "\0xC8" 2 "kh" + 0 "\0xC3" 2 "c" + 0 "\0xDE" 2 "ch" + 0 "\0xDB" 2 "sh" + 0 "\0xDD" 2 "shch" + 0 "\0xDF" 2 "{\cdprime}" + 0 "\0xD9" 2 "y" + 0 "\0xD8" 2 "{\cprime}" + 0 "\0xDC" 2 "\`e" + 0 "\0xC0" 2 "yu" + 0 "\0xD1" 2 "ya" diff --git a/support/translit/koi8-win.rus b/support/translit/koi8-win.rus new file mode 100644 index 0000000000..20c6e9ebf5 --- /dev/null +++ b/support/translit/koi8-win.rus @@ -0,0 +1,101 @@ +#hacked from koi8-gos.rus +# ytsuji@cfi.waseda.ac.jp +# 6 Dec 1995 +# only the column out_seq is changed. +#----good luck-- +# +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 -- original author +# File koi8-win.rus + +# This is a transliteration data file for converting from KOI8 (Relcom) +# KOI8 is meant to be GOST 19768-74, to Microsoft Code Page 1251 used as +# its Windows fonts and Russian key code. +# +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 0 # number of input SHIFT sequences, only one set of input characters + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set_numb inp_seq out_set_numb out_seq + 0 "\0xB3" 0 "\0xA8" #capital Yo + 0 "\0xA3" 0 "\0xB8" #small yo + 0 "\0xE1" 0 "\0xC0" #capital A + 0 "\0xE2" 0 "\0xC1" #capital Be + 0 "\0xF7" 0 "\0xC2" #capital Ve + 0 "\0xE7" 0 "\0xC3" #capital Ghe + 0 "\0xE4" 0 "\0xC4" #capital De + 0 "\0xE5" 0 "\0xC5" #capital Ie + 0 "\0xF6" 0 "\0xC6" #capital Zhe + 0 "\0xFA" 0 "\0xC7" #capital Ze + 0 "\0xE9" 0 "\0xC8" #capital I + 0 "\0xEA" 0 "\0xC9" #capital short I + 0 "\0xEB" 0 "\0xCA" #capital Ka + 0 "\0xEC" 0 "\0xCB" #capital El + 0 "\0xED" 0 "\0xCC" #capital Em + 0 "\0xEE" 0 "\0xCD" #capital En + 0 "\0xEF" 0 "\0xCE" #capital O + 0 "\0xF0" 0 "\0xCF" #capital Pe + 0 "\0xF2" 0 "\0xD0" #capital Er + 0 "\0xF3" 0 "\0xD1" #capital Es + 0 "\0xF4" 0 "\0xD2" #capital Te + 0 "\0xF5" 0 "\0xD3" #capital U + 0 "\0xE6" 0 "\0xD4" #capital Ef + 0 "\0xE8" 0 "\0xD5" #capital Kha + 0 "\0xE3" 0 "\0xD6" #capital Tse + 0 "\0xFE" 0 "\0xD7" #capital Che + 0 "\0xFB" 0 "\0xD8" #capital Sha + 0 "\0xFD" 0 "\0xD9" #capital Shcha + 0 "\0xFF" 0 "\0xDA" #capital hard sign (Ier) + 0 "\0xF9" 0 "\0xDB" #capital Y (Iery) + 0 "\0xF8" 0 "\0xDC" #capit soft sign(Ierik) + 0 "\0xFC" 0 "\0xDD" #capit reverse rounded E + 0 "\0xE0" 0 "\0xDE" #capital Yu + 0 "\0xF1" 0 "\0xDF" #capital Ya + 0 "\0xC1" 0 "\0xE0" #small a + 0 "\0xC2" 0 "\0xE1" #small be + 0 "\0xD7" 0 "\0xE2" #small ve + 0 "\0xC7" 0 "\0xE3" #small ghe + 0 "\0xC4" 0 "\0xE4" #small de + 0 "\0xC5" 0 "\0xE5" #small ie + 0 "\0xD6" 0 "\0xE6" #small zhe + 0 "\0xDA" 0 "\0xE7" #small z + 0 "\0xC9" 0 "\0xE8" #small i + 0 "\0xCA" 0 "\0xE9" #small short i + 0 "\0xCB" 0 "\0xEA" #small ka + 0 "\0xCC" 0 "\0xEB" #small el + 0 "\0xCD" 0 "\0xEC" #small em + 0 "\0xCE" 0 "\0xED" #small en + 0 "\0xCF" 0 "\0xEE" #small o + 0 "\0xD0" 0 "\0xEF" #small pe + 0 "\0xD2" 0 "\0xF0" #small er + 0 "\0xD3" 0 "\0xF1" #small es + 0 "\0xD4" 0 "\0xF2" #small te + 0 "\0xD5" 0 "\0xF3" #small u + 0 "\0xC6" 0 "\0xF4" #small ef + 0 "\0xC8" 0 "\0xF5" #small kha + 0 "\0xC3" 0 "\0xF6" #small tse + 0 "\0xDE" 0 "\0xF7" #small che + 0 "\0xDB" 0 "\0xF8" #small sha + 0 "\0xDD" 0 "\0xF9" #small shcha + 0 "\0xDF" 0 "\0xFA" #small hard sign (ier) + 0 "\0xD9" 0 "\0xFB" #small y (iery) + 0 "\0xD8" 0 "\0xFC" #small soft sign (ierik) + 0 "\0xDC" 0 "\0xFD" #small rev rounded e + 0 "\0xC0" 0 "\0xFE" #small yu + 0 "\0xD1" 0 "\0xFF" #small ya diff --git a/support/translit/order.txt b/support/translit/order.txt new file mode 100644 index 0000000000..456f539161 --- /dev/null +++ b/support/translit/order.txt @@ -0,0 +1,63 @@ + From: + + + + + To: JKL ENTERPRISES, INC. + P.O.Box 21821 + Upper Arlington, OH 43221-0821 + + + Please send me the executable, ready to run TRANSLIT program on + a diskette for the IBM-PC computer or compatible for MS-DOS 2.1 + or higher [see footnote]. + + I request the following medium (choose one): + + _____ 5.25 inch 360 kByte diskette + + _____ 3.5 inch 720 kByte diskette + with installation instructions. I understand that I will also receive + the transliteration tables and complete source of the program and + documentation as disk files. + + I understand that the TRANSLIT program comes without any warranty, and + the only claim which I can make towards JKL ENTERPRISES, INC. is to + replace a defective diskette. I also understand that this offer may be + withdrawn at any time. + + Prepaid orders (i.e., orders accompanied with a check or money order) + for the program are $15 (fifteen US Dollars). If an invoice is requested + there will be additional charge of $5 (five US Dollars) for processing. + There is no shipping and handling charge for orders within US. Outside + US please add the $1 dollar for Shipping and Handling. Diskette with the + program will be sent via 1st Class Mail or Air Mail, whichever applies. + I understand that the shipment will be made when funds are received. + + I enclose (fill in appropriate blanks): + + for the program ($15 per disk): ______ + + for the invoice to be billed later ($5) ______ + + Shipping/Handling if outside USA ($1 per disk) ______ + ------------------------------------------------------------- + + Total: ______ + + Ohio residents must add 5.75% tax of the Total: ______ + + Total+Tax(if Ohio Resident) ______ + + Please send the program to the following address: + + Name: __________________________________ + + Organization: __________________________________ + + Address: __________________________________ + + Town, State, Zip-code: __________________________________ + +_____________________________________________________ + [Footnote]: inquire for other computers/operating systems. diff --git a/support/translit/paths.h b/support/translit/paths.h new file mode 100644 index 0000000000..b5aec3caf8 --- /dev/null +++ b/support/translit/paths.h @@ -0,0 +1,72 @@ +/* Include file for translit.c program + * Copyright (c) 1993 Jan Labanowski and JKL Enterprises, Inc. + * Jan Labanowski, jkl@osc.edu, JKL@OHSTPY.BITNET Jan. 5, 1993 + * You must modify this file before you try to compile the program + */ + + +/* these are "standard" include files. Some may have different names on + your system. If program complains here, you need to check it */ + +#include <stdio.h> +#include <string.h> /* some older machines have <strings.h> !!! */ +#include <stdlib.h> /* some machines use <unix.h> here or some/no-thing */ +#include <ctype.h> + + +/* These are some defines which relate to the system and compiler + * you are running: + * 1 (one) means YES, TRUE, + * 0 (zero) means NO, FALSE + */ +#define GETOPT 1 /* does your C compiler have getopt routine? Most compilers + do, but for example VAX C does not. Some PCs do not, + UN*X usually has. Enter 1 if you have + getopt and 0 if you do not. */ + +#define GETENV 1 /* does your C compiler and system have getenv routine? + To my knowledge all UN*X, VAX-VMS and MS-DOS have. + Enter 1 if you have it, and 0 if you do not. If you do + not have GETENV, you do not have environment. */ + +#define STRCHR 1 /* the routine finding a position of a character in + a string is called strchr. If you do not have this + routine, say 0, if you have it, say 1 */ + +#define STRCSPN 1 /* some compiler libaries do not have the strcspn routine. + If you have it enter 1, if you do not, enter 0 */ + +#define STATICFUN 1 /* if your compiler supports declarations of + static functions: + static int boo(foo) + enter 1. If it chokes on it, change to 0. */ + + +/* if transliteration table file is not found in the current directory + * program looks for this file in directory pointed by TPATH. For UNIX + * it might be something like "/usr/local/lib/", and for MS-DOS it maybe + * something like: "C:\\INCLUDE\\". Remember to put a slash(backslash) + * after last subdirectory name. For DOS remember that backslashes have + * to be quoted, i.e., you enter the backslash twice. I did not check it + * for the VAX. + */ + /* search path for transliteration rules files */ +#define TPATH "/usr/local/lib/translit/" + +/* DECONVNAME --- default file name for conversion table (no path, just + * file name. + */ +#define DEFCONVNAME "koi8-tex.rus" + + +/* if environment variables TRANSP and TRANSF are defined, the + TPATH and DECONVNAME are taken from them, not from the above defs. + If these environment variables are booked you need to put here + something else. */ + +/* name of envoronment variable with TPATH */ +#define TRANSPATH "TRANSP" + +/* name of environment variable with DEFCONVNAME */ +#define DEFNAME "TRANSF" + diff --git a/support/translit/phg-koi8.rus b/support/translit/phg-koi8.rus new file mode 100644 index 0000000000..15489d54b7 --- /dev/null +++ b/support/translit/phg-koi8.rus @@ -0,0 +1,112 @@ + +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File phg-koi8.rus + +# This is a transliteration data file for converting from transliteration +# defined in the GOST 16876-71 standard to KOI8 as used by RELCOM. +# Since I never had a chance to look at the GOST 16876-71 document, +# the actual table is based on the info which I read on some list +# (I believe it was posted by Glenn Thobe on RUS-TEX) +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 2 # number of input SHIFT sequences +"" "" "" "" "" "" # no SHIFT-OUT/IN for Russian letters +"{" "" "" "" "}" "" # Latin text in braces {} + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table + +# Latin(ASCII) is embraced in {} + 2 [\0x21-\0x79] 0 [\0x21-\0x79] + +# White space and control characters + 0 [\0x01-\0x20] 0 [\0x01-\0x20] +# punctuation and digits + 0 [\0x21-\0x26\0x28-\0x3F\0x5B-\0x5F\0x7C\0x7e] + 0 [\0x21-\0x26\0x28-\0x3F\0x5B-\0x5F\0x7C\0x7e] +# inp_set_numb inp_seq out_set_numb out_seq + 1 {K[Hh]} 0 "\0xE8" # capital Kha + 1 {E[Hh]} 0 "\0xFC" # capital reverse round E + 1 {J[Oo]} 0 "\0xB3" # capital Yo + 1 {J[Ee]} 0 "\0xE5" # capital Je + 1 {Z[Hh]} 0 "\0xF6" # capital Zhe + 1 {J[Jj]} 0 "\0xEA" # capital short I + 1 {S[Hh][Cc][Hh]} 0 "\0xFD" # capital Shcha + 1 {C[Hh]} 0 "\0xFE" # capital Che + 1 {S[Hh]} 0 "\0xFB" # capital Sha + 1 {H[Hh]} 0 "\0xFD" # capital Shcha + 1 "``" 0 "\0xFF" # capital hard sign (Ier) + 1 {J[Uu]} 0 "\0xE0" # capital Yu + 1 {J[Aa]} 0 "\0xF1" # capital Ya + 1 "kh" 0 "\0xC8" # small kha + 1 "eh" 0 "\0xDC" # small reverse rounded e + 1 "jo" 0 "\0xA3" # small yo + 1 "zh" 0 "\0xD6" # small zhe + 1 "jj" 0 "\0xCA" # small short i + 1 "shch" 0 "\0xDD" # small shcha + 1 "ch" 0 "\0xDE" # small che + 1 "sh" 0 "\0xDB" # small sha + 1 "hh" 0 "\0xDD" # small shcha + 1 "''" 0 "\0xDF" # small hard sign (ier) + 1 "ju" 0 "\0xC0" # small yu + 1 "ja" 0 "\0xD1" # small ya + 1 "A" 0 "\0xE1" # capital A + 1 "B" 0 "\0xE2" # capital Be + 1 "V" 0 "\0xF7" # capital Ve + 1 "G" 0 "\0xE7" # capital Ghe + 1 "D" 0 "\0xE4" # capital De + 1 "E" 0 "\0xE5" # capital Je + 1 "Z" 0 "\0xFA" # capital Ze + 1 "I" 0 "\0xE9" # capital I + 1 "K" 0 "\0xEB" # capital Ka + 1 "L" 0 "\0xEC" # capital El + 1 "M" 0 "\0xED" # capital Em + 1 "N" 0 "\0xEE" # capital En + 1 "O" 0 "\0xEF" # capital O + 1 "P" 0 "\0xF0" # capital Pe + 1 "R" 0 "\0xF2" # capital Er + 1 "S" 0 "\0xF3" # capital Es + 1 "T" 0 "\0xF4" # capital Te + 1 "U" 0 "\0xF5" # capital U + 1 "F" 0 "\0xE6" # capital Ef + 1 "C" 0 "\0xE3" # capital Tse + 1 "Y" 0 "\0xF9" # capital Y (Iery) + 1 "`" 0 "\0xF8" # capital soft sign Ierik + + 1 "a" 0 "\0xC1" # small a + 1 "b" 0 "\0xC2" # small be + 1 "v" 0 "\0xD7" # small ve + 1 "g" 0 "\0xC7" # small ghe + 1 "d" 0 "\0xC4" # small de + 1 "e" 0 "\0xC5" # small je + 1 "z" 0 "\0xDA" # small z + 1 "i" 0 "\0xC9" # small i + 1 "k" 0 "\0xCB" # small ka + 1 "l" 0 "\0xCC" # small el + 1 "m" 0 "\0xCD" # small em + 1 "n" 0 "\0xCE" # small en + 1 "o" 0 "\0xCF" # small o + 1 "p" 0 "\0xD0" # small pe + 1 "r" 0 "\0xD2" # small er + 1 "s" 0 "\0xD3" # small es + 1 "t" 0 "\0xD4" # small te + 1 "u" 0 "\0xD5" # small u + 1 "f" 0 "\0xC6" # small ef + 1 "c" 0 "\0xC3" # small tse + 1 "y" 0 "\0xD9" # small y (iery) + 1 "'" 0 "\0xD8" # small soft sign (ierik) diff --git a/support/translit/pho-8sim.rus b/support/translit/pho-8sim.rus new file mode 100644 index 0000000000..3c6636aaa0 --- /dev/null +++ b/support/translit/pho-8sim.rus @@ -0,0 +1,236 @@ +# Jan Labanowski, jkl@osc.edu, Jan. 10, 1992 # File lc_koi8.dat + +# This is a transliteration data file for converting from various phonetic +# transliteration schemes to KOI-8 as used by RELCOM (GOST 19768-74). +# This is a simple, dirty conversion. If you want a more elaborate one +# look at pho-koi8.rus file. +# It is not possible to exactly represent phonetic transliteration +# since it is very flexible and frequently contradictory. +# The English text should be embraced in braces {}, while Russian one, +# is outside the braces. +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documenation + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + + +#starting sequence +"" + +#ending sequence +"" + + 2 # number of input SHIFT sequences, only one set of input characters +"" "" "" "" "" "" # no SHIFT-OUT/IN for Russian letters +"{" "" "" "" "}" "" # Latin text in braces {} + + 0 # number of output SHIFT sequences, two sets of input characters + +# conversion table +# inp_set inp_seq out_set out_seq + +# Latin(ASCII) is embraced in {} + 2 ["'A-Za-z] 0 ["'A-Za-z] + +# Cyrillic letters + +# If already converted to KOI8 by backstepping, send it to output + 1 {([\0x80-\0xFF])} 0 {\1} + +# Convert " followed by a capital letter to capital Tvyordyj znak and backstep +# otherwise " will be treated as a small tvyordyj znak + 1 {"([^A-Za-z])} 0 {"\1} # " at the end + 1 {([^A-Za-z])"} 0 {\1"} # " at the beginning + 1 {"([A-Z])} -2 {\0xFF\1} # capital Tvyordyj znak + + + 1 {Q[Hh]} 0 "\0xFF" # Some use it as Tvyordyj + 1 "qh" 0 "\0xDF" # Some use it as tvyordyj + 1 "\0x22" 0 "\0xDF" # tvyordyj znak + +# Convert ' preceded by a capital letter to capital Myagkij znak and backstep +# otherwise ' will be trated as a small myagkij znak + + 1 "''" 0 "''" # double quote + 1 {([^A-Za-z])'} 0 {\1'} # opening quote + 1 {(S[Hh][Cc][Hh])'} -1 {\1\0xF8} + 1 {(S[Hh])'} -1 {\1\0xF8} + 1 {(C[Hh])'} -1 {\1\0xF8} + 1 {(T[Cc][Hh])'} -1 {\1\0xF8} + 1 {([A-Z])'} -1 {\1\0xF8} + + 1 "Q" 0 "\0xF8" + + 1 "'" 0 "\0xD8" # myagkij znak + 1 "q" 0 "\0xD8" + + 1 {([YIJ]?[EOUA])Y([^A-Za-z])} -1 {\1\0xEA\2} #-J + 1 {([yij]?[eoua])y([^A-Za-z])} -1 {\1\0xCA\2} #-j + 1 {([J]?[EOAUY])[IJ]([^A-Za-z])} -1 {\1\0xEA\2} #-J -YI,YJ + 1 {([j]?[eoauy])[ij]([^A-Za-z])} -1 {\1\0xCA\2} #-j -yi,yj + +# the story of ts versus c (the ts for c was a stupid idea of Library of +# Congress --- very, very stupid... T and S should be T and S, not C). + 1 "INTS" 0 "\0xE9\0xED\0xE3" #INC + 1 "INC" 0 "\0xE9\0xED\0xE3" #INC + 1 "ints" 0 "\0xC9\0xCD\0xC3" #inc + 1 "inc" 0 "\0xC9\0xCD\0xC3" #inc + 1 "CI" 0 "\0xE3\0xE9" + 1 "ci" 0 "\0xC3\0xC9" + 1 {AVIA(TS|C)} 0 "\0xE1\0xE2\0xE9\0xE1\0xE3" #aviac + 1 {avia(ts|c)} 0 "\0xC1\0xC2\0xC9\0xC1\0xC3" + 1 {tsi([iyjo])} -2 {\0xC3\0xC9\1} # ci + 1 {TSI([IYJO])} -2 {\0xE3\0xE9\1} # ci + 1 {T[Ss]([Aa])} -2 {\0xE3\1} # CA + 1 {t[Ss]([Aa])} -2 {\0xC3\1} # ca + 1 {([DdKk])T[Ss]} -1 {\1\0xE3} # DC or KC + 1 {([DdKk])t[Ss]} -1 {\1\0xC3} # dc or kc + 1 {TS([^A-Za-z])} -2 {\0xE3\1} # C + 1 {ts([^A-Za-z])} -2 {\0xC3\1} # c + +# Je --- people frequently write e instead of Je. E oborotnoje is +# frequently at the beginning of foreign origin words + + 1 "AER" 0 "\0xE1\0xFC\0xF2" + 1 {([Aa])er} -1 {\1\0xDC\0xD2} + + 1 {([^A-Za-z])e([Mm][Uu]?[^A-Za-z])} -1 {\1\0xC5\2} # je + 1 {([^A-Za-z])E([Mm][Uu]?[^A-Za-z])} -1 {\1\0xE5\2} # Je + 1 {([^A-Za-z])e([Mm][Ll])} -1 {\1\0xC5\2} # je + 1 {([^A-Za-z])E([Mm][Ll])} -1 {\1\0xE5\2} # Je + + 1 {([A-Za-z])'[IiYyJj]?E} -1 {\1\0xF8\0xE5} # Je + 1 {([A-Za-z])'[IiYyJj]?e} -1 {\1\0xD8\0xC5} # je + + 1 {([^A-Za-z])E([Ll][^EeIiLlYyJj'])} -1 {\1\0xE5\2} # Je + 1 {([^A-Za-z])e([Ll][^EeIiLlYyJj'])} -1 {\1\0xC5\2} # Je + + 1 {([^A-Za-z])e([Ll][YyIiJj]?[Ee][^A-Za-z])} -1 {\1\0xC5\2} # je + 1 {([^A-Za-z])E([Ll][YyIiJj]?[Ee][^A-Za-z])} -1 {\1\0xE5\2} # Je + + 1 {([^A-Za-z])e([Rr][Uu])} -1 {\1\0xC5\2} # je + 1 {([^A-Za-z])E([Rr][Uu])} -1 {\1\0xE5\2} # Je + + 1 {([^A-Za-z])e([Ss][HhTtLl])} -1 {\1\0xC5\2} # je + 1 {([^A-Za-z])E([Ss][HhTtLl])} -1 {\1\0xE5\2} # Je + + 1 {([^A-Za-z])E([Ll][Ee][KkGg])} -1 {\1\0xFC\2} # `Elek,g + 1 {([^A-Za-z])e([Ll][Ee][KkGg])} -1 {\1\0xDC\2} # `elek,g + + 1 {([^A-Za-z])E([Kk][Aa])} -1 {\1\0xE5\2} # Jekater + 1 {([^A-Za-z])e([Kk][Aa])} -1 {\1\0xC5\2} # jekater + + 1 {([^A-Za-z])e([KLMNPRSTFklmnprstf])} -1 {\1\0xDC\2} #e oborotn + 1 {([^A-Za-z])E([KLMNPRSTFklmnprstf])} -1 {\1\0xFC\2} #E oborotn + + 1 {([iIOoPpUuFfYy])i[Ee]} -1 {\1\0xC5} # ie->je + 1 {([iIOoPpUuFfYy])I[Ee]} -1 {\1\0xE5} # ie->je + +# Eh is e oborotnoje but not at the end of the word + 1 {E[Hh]([^A-Za-z]+)} 0 {\0xE5\0xE8\1} + 1 {e[Hh]([^A-Za-z]+)} 0 {\0xC5\0xC8\1} + 1 {E[Hh]} 0 "\0xFC" # E oborotnoje + 1 "eh" 0 "\0xDC" # e oboritnoje + +# Various I kratkoe + 1 {J[Ii]} 0 "\0xEA" # I kratkoje + 1 {J[Jj]} 0 "\0xEA" + 1 "ji" 0 "\0xCA" # i kratkoje + 1 "jj" 0 "\0xCA" + + + +# SHCH + 1 {s[Hh][Cc][Hh]} 0 "\0xDD" + 1 "w" 0 "\0xDD" + 1 {S[Hh][Cc][Hh]} 0 "\0xFD" + 1 "W" 0 "\0xFD" + + + 1 {[YJ][Oo]} 0 "\0xB3" # capital Jo + 1 {J[Ee]} 0 "\0xE5" # Je + 1 {RIU(M[^A-Za-z])} -1 {\0xF2\0xE9\0xF5\2} # IU + 1 {([^A-Za-z])I([Uu][Dd])} -1 {\1\0xE9\2} + 1 "DIUS" 0 "\0xE4\0xE9\0xF5\0xF3" + 1 {[IYJ][Uu]} 0 "\0xE0" # Ju + 1 {([Dd])I([Aa][KkGgPp])} -1 {\1\0xE9\2} # dia + 1 "RIAL" 0 "\0xF2\0xE9\0xE1\0xEC" # rial + 1 "KIA" 0 "\0xEB\0xE9\0xE1" # kia + 1 {[IYJ][Aa]} 0 "\0xF1" # Ja + 1 {Z[Hh]} 0 "\0xF6" + 1 {K[Hh]} 0 "\0xE8" + 1 {H[Hh]} 0 "\0xE8" + 1 {C[Hh]} 0 "\0xFE" + 1 {S[Hh]} 0 "\0xFB" + 1 "zh" 0 "\0xD6" + 1 "kh" 0 "\0xC8" + 1 "hh" 0 "\0xC8" + 1 "ch" 0 "\0xDE" + 1 "sh" 0 "\0xDB" + 1 {[yj]o} 0 "\0xA3" #jo + 1 "je" 0 "\0xC5" #je + + 1 {([Rr])iu([Mm][^A-Za-z])} -1 {\1\0xC9\0xD5\2} # iu + 1 {([^A-Za-z])i(ud)} -1 {\1\0xC9\2} + 1 "dius" 0 "\0xC4\0xC9\0xD5\0xD3" + 1 {[iyj]u} 0 "\0xC0" #ju + 1 {([Dd])ia([kgp])} -1 {\1\0xC9\0xC1\2} # dia + 1 "rial" 0 "\0xD2\0xC9\0xC1\0xCC" # rial + 1 "kia" 0 "\0xCB\0xC9\0xC1" # kia + 1 {[iyj]a} 0 "\0xD1" #ja + + 1 "A" 0 "\0xE1" + 1 "B" 0 "\0xE2" + 1 "V" 0 "\0xF7" + 1 "G" 0 "\0xE7" + 1 "D" 0 "\0xE4" + 1 "Z" 0 "\0xFA" + 1 "I" 0 "\0xE9" + 1 "J" 0 "\0xEA" # I kratkoje + 1 "K" 0 "\0xEB" + 1 "L" 0 "\0xEC" + 1 "M" 0 "\0xED" + 1 "N" 0 "\0xEE" + 1 "O" 0 "\0xEF" + 1 "P" 0 "\0xF0" + 1 "R" 0 "\0xF2" + 1 "S" 0 "\0xF3" + 1 "T" 0 "\0xF4" + 1 "U" 0 "\0xF5" + 1 "F" 0 "\0xE6" + 1 "X" 0 "\0xE8" # Kha + 1 "H" 0 "\0xE8" # Kha + 1 "C" 0 "\0xE3" + 1 "Y" 0 "\0xF9" + 1 "E" 0 "\0xE5" #Je + 1 "a" 0 "\0xC1" + 1 "b" 0 "\0xC2" + 1 "v" 0 "\0xD7" + 1 "g" 0 "\0xC7" + 1 "d" 0 "\0xC4" + 1 "z" 0 "\0xDA" + 1 "i" 0 "\0xC9" + 1 "j" 0 "\0xCA" + 1 "k" 0 "\0xCB" + 1 "l" 0 "\0xCC" + 1 "m" 0 "\0xCD" + 1 "n" 0 "\0xCE" + 1 "o" 0 "\0xCF" + 1 "p" 0 "\0xD0" + 1 "r" 0 "\0xD2" + 1 "s" 0 "\0xD3" + 1 "t" 0 "\0xD4" + 1 "u" 0 "\0xD5" + 1 "f" 0 "\0xC6" + 1 "x" 0 "\0xC8" # kha + 1 "h" 0 "\0xC8" # kha + 1 "c" 0 "\0xC3" + 1 "y" 0 "\0xD9" + 1 "e" 0 "\0xC5" # je + + diff --git a/support/translit/pho-koi8.rus b/support/translit/pho-koi8.rus new file mode 100644 index 0000000000..dacbe279fd --- /dev/null +++ b/support/translit/pho-koi8.rus @@ -0,0 +1,228 @@ +# Jan Labanowski, jkl@osc.edu, Jan. 10, 1992 # File lc_koi8.dat + +# This is a transliteration data file for converting from various phonetic +# transliteration schemes to KOI-8 as used by RELCOM (GOST 19768-74). +# It is not possible to exactly represent phonetic transliteration +# since it is very flexible and frequently contradictory. +# This file is compilcated (in my humble opinion) and it will take +# a substantial amount of time to process longer files on a slower +# computer. However, this is what you get, of you want something more +# or less general. If your phonetic transliteration is consistent +# and unequivocal, you will be much better of to write a specific +# transliteration file, e.g. the GOST 16876-71 transliteration file (phg) or +# Pokrovsky scheme (php). +# The English text should be embraced in braces {}, while Russian one, +# is outside the braces. +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documenation + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + + +#starting sequence +"" + +#ending sequence +"" + + 2 # number of input SHIFT sequences +"" "" "" "" "" "" # no SHIFT-OUT/IN for Russian letters +"{" "" "" "" "}" "" # Latin text in braces {} + + 0 # number of output SHIFT sequences, two sets of input characters + +# conversion table +# inp_set inp_seq out_set out_seq + +# Latin(ASCII) is embraced in {} + 2 ["'A-Za-z] 0 ["'A-Za-z] + +# Cyrillic letters + +# If already converted to KOI8 by backstepping, send it to output + 1 {([\0x80-\0xFF])} 0 {\1} + +# Convert " followed by a capital letter to capital Tvyordyj znak and backstep +# otherwise " will be treated as a small tvyordyj znak + 1 {"([^A-Za-z])} 0 {"\1} # " at the end + 1 {([^A-Za-z])"} 0 {\1"} # " at the beginning + 1 {"([A-Z])} -2 {\0xFF\1} # capital Tvyordyj znak + + + 1 {Q[Hh]} 0 "\0xFF" # Some use it as Tvyordyj + 1 "qh" 0 "\0xDF" # Some use it as tvyordyj + 1 "\0x22" 0 "\0xDF" # tvyordyj znak + +# Convert ' preceded by a capital letter to capital Myagkij znak and backstep +# otherwise ' will be trated as a small myagkij znak + + 1 "''" 0 "''" # double quote + 1 {([^A-Za-z])'} 0 {\1'} # opening quote +# Muagkij znak + 1 {((S[Hh][Cc][Hh])|(S[Hh])|(C[Hh])|(T[Cc][Hh])|([A-Z]))'} -1 {\1\0xF8} + + 1 "Q" 0 "\0xF8" + + 1 "'" 0 "\0xD8" # myagkij znak + 1 "q" 0 "\0xD8" + + 1 {(([YIJ]?[EOUA])|([J]?[EOAUY]))((Y)|([IJ]))([^A-Za-z])} -1 {\1\0xEA\7} #-J +# 12 3 45 6 7 + 1 {(([yij]?[eoua])|([j]?[eoauy]))((y)|([ij]))([^A-Za-z])} -1 {\1\0xCA\7} #-j +# 12 3 45 6 7 + +# the story of ts versus c (the ts for c was a stupid idea of Library of +# Congress --- very, very stupid... T and S should be T and S, not C). + 1 "INTS" 0 "\0xE9\0xED\0xE3" #INC + 1 "INC" 0 "\0xE9\0xED\0xE3" #INC + 1 "ints" 0 "\0xC9\0xCD\0xC3" #inc + 1 "inc" 0 "\0xC9\0xCD\0xC3" #inc + 1 "CI" 0 "\0xE3\0xE9" + 1 "ci" 0 "\0xC3\0xC9" + 1 {AVIA(TS|C)} 0 "\0xE1\0xE2\0xE9\0xE1\0xE3" #aviac + 1 {avia(ts|c)} 0 "\0xC1\0xC2\0xC9\0xC1\0xC3" + 1 {tsi([iyjo])} -2 {\0xC3\0xC9\1} # ci + 1 {TSI([IYJO])} -2 {\0xE3\0xE9\1} # ci + 1 {T[Ss]([Aa])} -2 {\0xE3\1} # CA + 1 {t[Ss]([Aa])} -2 {\0xC3\1} # ca + 1 {([DdKk])T[Ss]} -1 {\1\0xE3} # DC or KC + 1 {([DdKk])t[Ss]} -1 {\1\0xC3} # dc or kc + 1 {TS([^A-Za-z])} -2 {\0xE3\1} # C + 1 {ts([^A-Za-z])} -2 {\0xC3\1} # c + +# Je --- people frequently write e instead of Je. E oborotnoje is +# frequently at the beginning of foreign origin words + + 1 "AER" 0 "\0xE1\0xFC\0xF2" + 1 {([Aa])er} -1 {\1\0xDC\0xD2} + + 1 {([A-Za-z])'[IiYyJj]?E} -1 {\1\0xF8\0xE5} # Je + 1 {([A-Za-z])'[IiYyJj]?e} -1 {\1\0xD8\0xC5} # je + +# Capital Je + 1 {([^A-Za-z])E(([Mm][Uu]?[^A-Za-z])|([Mm][Ll])|([Ll][^EeIiLlYyJj'])\ + |([Ll][YyIiJj]?[Ee][^A-Za-z])|([Rr][Uu])|([Ss][HhTtLl])|([Kk][Aa]))} + + -1 {\1\0xE5\2} # Je +# Small je + 1 {([^A-Za-z])e(([Mm][Uu]?[^A-Za-z])|([Mm][Ll])|([Ll][^EeIiLlYyJj'])\ + |([Ll][YyIiJj]?[Ee][^A-Za-z])|([Rr][Uu])|([Ss][HhTtLl])|([Kk][Aa]))} + -1 {\1\0xC5\2} # je + +# Capital Eh + 1 {([^A-Za-z])E(([Ll][Ee][KkGg])|([KLMNPRSTFklmnprstf]))} -1 {\1\0xFC\2} #Eh + +# Small eh + 1 {([^A-Za-z])e(([Ll][Ee][KkGg])|([KLMNPRSTFklmnprstf]))} -1 {\1\0xDC\2} #eh + + 1 {([iIOoPpUuFfYy])i[Ee]} -1 {\1\0xC5} # ie->je + 1 {([iIOoPpUuFfYy])I[Ee]} -1 {\1\0xE5} # ie->je + +# Eh is e oborotnoje but not at the end of the word + 1 {E[Hh]([^A-Za-z]+)} 0 {\0xE5\0xE8\1} + 1 {e[Hh]([^A-Za-z]+)} 0 {\0xC5\0xC8\1} + 1 {E[Hh]} 0 "\0xFC" # E oborotnoje + 1 "eh" 0 "\0xDC" # e oboritnoje + +# Various I kratkoe + 1 {J[Ii]} 0 "\0xEA" # I kratkoje + 1 {J[Jj]} 0 "\0xEA" + 1 "ji" 0 "\0xCA" # i kratkoje + 1 "jj" 0 "\0xCA" + + + +# SHCH + 1 {s[Hh][Cc][Hh]} 0 "\0xDD" + 1 "w" 0 "\0xDD" + 1 {S[Hh][Cc][Hh]} 0 "\0xFD" + 1 "W" 0 "\0xFD" + + + 1 {[YJ][Oo]} 0 "\0xB3" # capital Jo + 1 {J[Ee]} 0 "\0xE5" # Je + 1 {RIU(M[^A-Za-z])} -1 {\0xF2\0xE9\0xF5\2} # IU + 1 {([^A-Za-z])I([Uu][Dd])} -1 {\1\0xE9\2} + 1 "DIUS" 0 "\0xE4\0xE9\0xF5\0xF3" + 1 {[IYJ][Uu]} 0 "\0xE0" # Ju + 1 {([Dd])I([Aa][KkGgPp])} -1 {\1\0xE9\2} # dia + 1 "RIAL" 0 "\0xF2\0xE9\0xE1\0xEC" # rial + 1 "KIA" 0 "\0xEB\0xE9\0xE1" # kia + 1 {[IYJ][Aa]} 0 "\0xF1" # Ja + 1 {Z[Hh]} 0 "\0xF6" + 1 {K[Hh]} 0 "\0xE8" + 1 {H[Hh]} 0 "\0xE8" + 1 {C[Hh]} 0 "\0xFE" + 1 {S[Hh]} 0 "\0xFB" + 1 "zh" 0 "\0xD6" + 1 "kh" 0 "\0xC8" + 1 "hh" 0 "\0xC8" + 1 "ch" 0 "\0xDE" + 1 "sh" 0 "\0xDB" + 1 {[yj]o} 0 "\0xA3" #jo + 1 "je" 0 "\0xC5" #je + + 1 {([Rr])iu([Mm][^A-Za-z])} -1 {\1\0xC9\0xD5\2} # iu + 1 {([^A-Za-z])i(ud)} -1 {\1\0xC9\2} + 1 "dius" 0 "\0xC4\0xC9\0xD5\0xD3" + 1 {[iyj]u} 0 "\0xC0" #ju + 1 {([Dd])ia([kgp])} -1 {\1\0xC9\0xC1\2} # dia + 1 "rial" 0 "\0xD2\0xC9\0xC1\0xCC" # rial + 1 "kia" 0 "\0xCB\0xC9\0xC1" # kia + 1 {[iyj]a} 0 "\0xD1" #ja + + 1 "A" 0 "\0xE1" + 1 "B" 0 "\0xE2" + 1 "V" 0 "\0xF7" + 1 "G" 0 "\0xE7" + 1 "D" 0 "\0xE4" + 1 "Z" 0 "\0xFA" + 1 "I" 0 "\0xE9" + 1 "J" 0 "\0xEA" # I kratkoje + 1 "K" 0 "\0xEB" + 1 "L" 0 "\0xEC" + 1 "M" 0 "\0xED" + 1 "N" 0 "\0xEE" + 1 "O" 0 "\0xEF" + 1 "P" 0 "\0xF0" + 1 "R" 0 "\0xF2" + 1 "S" 0 "\0xF3" + 1 "T" 0 "\0xF4" + 1 "U" 0 "\0xF5" + 1 "F" 0 "\0xE6" + 1 "X" 0 "\0xE8" # Kha + 1 "H" 0 "\0xE8" # Kha + 1 "C" 0 "\0xE3" + 1 "Y" 0 "\0xF9" + 1 "E" 0 "\0xE5" #Je + 1 "a" 0 "\0xC1" + 1 "b" 0 "\0xC2" + 1 "v" 0 "\0xD7" + 1 "g" 0 "\0xC7" + 1 "d" 0 "\0xC4" + 1 "z" 0 "\0xDA" + 1 "i" 0 "\0xC9" + 1 "j" 0 "\0xCA" + 1 "k" 0 "\0xCB" + 1 "l" 0 "\0xCC" + 1 "m" 0 "\0xCD" + 1 "n" 0 "\0xCE" + 1 "o" 0 "\0xCF" + 1 "p" 0 "\0xD0" + 1 "r" 0 "\0xD2" + 1 "s" 0 "\0xD3" + 1 "t" 0 "\0xD4" + 1 "u" 0 "\0xD5" + 1 "f" 0 "\0xC6" + 1 "x" 0 "\0xC8" # kha + 1 "h" 0 "\0xC8" # kha + 1 "c" 0 "\0xC3" + 1 "y" 0 "\0xD9" + 1 "e" 0 "\0xC5" # je + + diff --git a/support/translit/php-koi8.rus b/support/translit/php-koi8.rus new file mode 100644 index 0000000000..a428768eed --- /dev/null +++ b/support/translit/php-koi8.rus @@ -0,0 +1,109 @@ +# Jan Labanowski, jkl@osc.edu, Dec. 30, 1992 +# File php-koi8.rus + +# This is a transliteration data file for converting from transliteration +# called Pokrovsky and announced at EuroTex92 (from the message to RUSTEX +# by Joseph Romanovsky). to KOI8 as used by RELCOM. +# To be used with translit.c program by Jan Labanowski + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + 2 # number of input SHIFT sequences +"" "" "" "" "" "" # no SHIFT-OUT/IN for Russian letters +"{" "" "" "" "}" "" # Latin text in braces {} + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table + +# Latin(ASCII) is embraced in {} + 2 [A-Za-z] 0 [A-Za-z] + +# White space and control characters + 0 [\0x01-\0x20] 0 [\0x01-\0x20] +# punctuation and digits + 0 [\0x21-\0x3F\0x5B-\0x60\0x7B-\0x7E] 0 [\0x21-\0x3F\0x5B-\0x60\0x7B-\0x7E] + +# inp_set_numb inp_seq out_set_numb out_seq + 1 {K[Hh]} 0 "\0xE8" # capital Kha + 1 {E[Hh]} 0 "\0xFC" # capital reverse round E + 1 {J[Oo]} 0 "\0xB3" # capital Yo + 1 {J[Ee]} 0 "\0xE5" # capital Je + 1 {Z[Hh]} 0 "\0xF6" # capital Zhe + 1 {J[Ii]} 0 "\0xEA" # capital short I + 1 {S[Hh][Cc][Hh]} 0 "\0xFD" # capital Shcha (in case) + 1 {C[Hh]} 0 "\0xFE" # capital Che + 1 {S[Hh]} 0 "\0xFB" # capital Sha + 1 {J[Uu]} 0 "\0xE0" # capital Yu + 1 {J[Aa]} 0 "\0xF1" # capital Ya + 1 "kh" 0 "\0xC8" # small kha + 1 "eh" 0 "\0xDC" # small reverse rounded e + 1 "jo" 0 "\0xA3" # small yo + 1 "zh" 0 "\0xD6" # small zhe + 1 "ji" 0 "\0xCA" # small short i + 1 "shch" 0 "\0xDD" # small shcha (in case) + 1 "ch" 0 "\0xDE" # small che + 1 "sh" 0 "\0xDB" # small sha + 1 "ju" 0 "\0xC0" # small yu + 1 "ja" 0 "\0xD1" # small ya + 1 "A" 0 "\0xE1" # capital A + 1 "B" 0 "\0xE2" # capital Be + 1 "V" 0 "\0xF7" # capital Ve + 1 "G" 0 "\0xE7" # capital Ghe + 1 "D" 0 "\0xE4" # capital De + 1 "E" 0 "\0xE5" # capital Je + 1 "Z" 0 "\0xFA" # capital Ze + 1 "I" 0 "\0xE9" # capital I + 1 "K" 0 "\0xEB" # capital Ka + 1 "L" 0 "\0xEC" # capital El + 1 "M" 0 "\0xED" # capital Em + 1 "N" 0 "\0xEE" # capital En + 1 "O" 0 "\0xEF" # capital O + 1 "P" 0 "\0xF0" # capital Pe + 1 "R" 0 "\0xF2" # capital Er + 1 "S" 0 "\0xF3" # capital Es + 1 "T" 0 "\0xF4" # capital Te + 1 "U" 0 "\0xF5" # capital U + 1 "F" 0 "\0xE6" # capital Ef + 1 "C" 0 "\0xE3" # capital Tse + 1 "W" 0 "\0xFD" # capital Shcha + 1 "X" 0 "\0xFF" # capital hard sign (Ier) + 1 "Y" 0 "\0xF9" # capital Y (Iery) + 1 "Q" 0 "\0xF8" # capital soft sign Ierik + + 1 "a" 0 "\0xC1" # small a + 1 "b" 0 "\0xC2" # small be + 1 "v" 0 "\0xD7" # small ve + 1 "g" 0 "\0xC7" # small ghe + 1 "d" 0 "\0xC4" # small de + 1 "e" 0 "\0xC5" # small je + 1 "z" 0 "\0xDA" # small z + 1 "i" 0 "\0xC9" # small i + 1 "k" 0 "\0xCB" # small ka + 1 "l" 0 "\0xCC" # small el + 1 "m" 0 "\0xCD" # small em + 1 "n" 0 "\0xCE" # small en + 1 "o" 0 "\0xCF" # small o + 1 "p" 0 "\0xD0" # small pe + 1 "r" 0 "\0xD2" # small er + 1 "s" 0 "\0xD3" # small es + 1 "t" 0 "\0xD4" # small te + 1 "u" 0 "\0xD5" # small u + 1 "f" 0 "\0xC6" # small ef + 1 "c" 0 "\0xC3" # small tse + 1 "w" 0 "\0xDD" # small shcha + 1 "x" 0 "\0xDF" # small hard sign (ier) + 1 "y" 0 "\0xD9" # small y (iery) + 1 "q" 0 "\0xD8" # small soft sign (ierik) diff --git a/support/translit/readme.doc b/support/translit/readme.doc new file mode 100644 index 0000000000..807ccadee2 --- /dev/null +++ b/support/translit/readme.doc @@ -0,0 +1,190 @@ +WHAT IS TRANSLIT PROGRAM +======================== +The TRANSLIT program is used to transliterate character codes. +The ASCII table of characters (containing characters with codes 0 to 127) +is a table for English language. For other languages many different schemes +are used to represent their respective alphabets. Some use codes larger +than 127, some use multicharacter sequences to represent a single letter +in foreign alphabets. There is also UNICODE and other proposed standards +to use units larger than 8-bits(1 byte) to represent foreign alphabets. +For example, UNICODE will use 16-bit(2 byte) codes. At this moment, the +TRANSLIT program supports only 8-bit codes, but will be expanded to +UNICODE if there is enough interest. + +It is frequently necessary to convert from one representation to another +representation of the foreign alphabet. E.g., in the Library of Congress +transliteration, the Russian letter sha is transliterated as two Latin +letters "sh" while the popular word processors use a code 232 (decimal), +the RELCOM network uses a code 221, and the KOI7 set uses character "[" +for the same letter. So if your screen driver, printer, word processor, +etc. uses different codes than your text, you need to transliterate. + +The TRANSLIT program is a powerful tool for such tasks. It converts an input +file in one representation to the output file in another representation using +an appropriate, user defined, transliteration table. Transliteration table +allows for very elaborate transliteration tasks and includes provisions for +plain character sequences, character lists, regular expressions (flexible +matches), SHIFT-OUT/IN sequences and more. The program comes with documentation +and examples of popular transliteration schemes for Russian language. Other +files will be added with your collaboration. + +FILES IN THE PROGRAM DISTRIBUTION +================================ +The following files are currently in the distribution. They are all ASCII +(text) files (with the exception on translit.tar.Z and translit.zip). +Please note that the copyright notice requires that, if you distribute this +program, you have to distribute the complete set of files. +TRANSLIT is copyrighted: Copyright (c) Jan Labanowski and JKL Enterprises, Inc. + + Name Description + DOCUMENTATION +readme.bugs List of known bugs in translit. This file may change + daily. It also contains info which files contain fixed + code/transliteration files. The fixed code will be a part + of next release and it is given here for testing and is not + a part of the current release. + +readme.doc This file +translit.ps PostScript version of program documentation and + installation procedure +translit.1 [nt]roff version of the above in the format + of UN*X man page (use -man option with [nt]roff) +translit.txt Plain text version of the above. +order.txt Order form for ordering the executable program (compiled + with installation script and instructions) + + TRANSLITERATION TABLES FOR RUSSIAN (read comments in the files) +alt-gos.rus ALT to GOSTCII table +alt-koi8.rus ALT to KOI8 table +gos-alt.rus GOSTCII to ALT table +gos-koi8.rus GOSTCII to KOI8 table +hex-text.rus hexnumbers (e.g., =A6) to actual codes +k8-tavtt.rus KOI8 to Bill Tavolga cyrttf truetype font mapping +koi7-8.rus KOI7 to KOI8 table +koi7nl-8.rus KOI7 (no Latin) to KOI8 table +koi8-7.rus KOI8 to KOI7 table +koi8-alt.rus KOI8 to ALT table +koi8-gos.rus KOI8 to GOSTCII table +koi8-lc.rus KOI8 to Library of Congress table +koi8-phg.rus KOI8 to GOST transliteration +koi8-php.rus KOI8 to Pokrovsky transliteration +koi8-tex.rus KOI8 to LaTeX conversion +phg-koi8.rus GOST transliteration to KOI8 +pho-8sim.rus Simple phonetic to KOI8 +pho-koi8.rus Various phonetic to KOI8 +php-koi8.rus Pokrovsky transliteration to KOI8 +tex-koi8.rus LaTeX to KOI8 + + EXAMPLES +example.alt.uu uuencoded example in ALT +example.ko8.uu uuencoded example in KOI8 +example.pho phonetic transliteration example +example.tex LaTeX example + + TRANSLIT PROGRAM SOURCE in C. +translit.c Main program +paths.h Include file +reg_exp.h Include file +reg_exp.c Modified regular expression package by H. Spencer +reg_sub.c Modified regular expression package by H. Spencer + + + PACKED FILES CONTAINING THE WHOLE DISTRIBUTION FROM ABOVE +translit.tar.Z --- Compressed tar file with the whole distribution. + ON UN*X use: + zcat translit.tar.Z | tar xvof - + to get all individual files. This file is BINARY, and + you should not attempt to obtain it via email. + This is a best way to get the whole ditribution via + ftp if you are on the UN*X machine. +translit.tar.z.uu --- uuencoded file from the above. It can be transmitted + via e-mail, but it is a large file, and if your mailer + sets limits on your messages, it may not be correctly + transmitted. To recover individual files from the + email message, do: + uudecode message_file + where the mesage_file is a saved email message. + You will obtain translit.tar.Z file which you can + unpack as described above. +translit.zip --- This is a "zipped" file (i.e., compressed with a ZIP + program. It is binary (i.e., you cannot get it via + e-mail, but you can get it via ftp with binary switch + set) To get individual file do: + unzip translit.zip (in UNIX) + or + PKUNZIP translit.zip (under MS-DOS) + and you will obtain a full distribution. +translit.zip.uu --- Uuencoded file from above. Can be sent via e-mail but + it is big. To recover all files do: + uudecode message_file + where message_file is your saved message and then + "unzip" it as shown above. + + + HOW TO OBTAIN THE FILES: + ======================= + +Via FTP (if you are on Internet): +--------------------------------- + ftp infomeister.osc.edu + Login: anonymous + Password: Your_email_address (Please...) + ftp> ascii (or binary if you retrieve binary files) + ftp> cd pub/russian/translit + ftp> get file_name + ..... (for each file) + ftp> quit + +Via E-mail: +----------- + Send message: + select russian + limit 1MB + size 50k + get translit/file_name .... (file_name is a name of the file given above) + qui + to MAILSERV@osc.edu You can retrieve more files with a single message by placing + several lines of get ... The file(s) will be forwarded to your mailbox automatically. + +The "file_name" in the instructions above means any file from the list +given above. If you do not know or have programs like uudecode, unzip, tar, +zcat or uncompress, get all individual files one by one. If you know how +to use the above programs it may be faster for you to get a tar or zip +archive and unpack it. + +Program installation and compilation is described in the translit docs. +Since the program requires that you make small changes to paths.h before +compilation (depending on your system and environment), I cannot realy +distribute generic executables (i.e., compiled programs). You have to modify +paths.h to suit your needs and operating system and compile the program using +your favorite C compiler. + +GETTING THE READY TO RUN PROGRAM +================================ +If you do not have time, do not have resources, or for whatever reason +you wish a ready to run executable of TRANSLIT, you can order it for +a very modest fee from JKL ENTERPRISES, INC. as described in the file: +order.txt. It will come with an easy installation script which will ask +you a few simple questions and install the program. + +I invite, and will try to answer, bug reports, comments and suggestions. +If there is an interest I will work on optimizing the program, on supporting +the UNICODE, and other enhancements which you suggest. If you use the +program for commercial purposes, and on many computers in your organization, +you might want to buy the program from JKL ENTERPRISES, INC., to aid further +development, though you are not required to do so. + + +Enjoy, + +Author coordinates: +Jan Labanowski +P.O. Box 21821 +Columbus, OH 43221-0821, USA +jkl@osc.edu, JKL@OHSTPY.BITNET +------------------------------ + + + + + diff --git a/support/translit/reg_exp.c b/support/translit/reg_exp.c new file mode 100644 index 0000000000..981ed1a8f0 --- /dev/null +++ b/support/translit/reg_exp.c @@ -0,0 +1,1236 @@ +/* + * reg_comp and reg_exec -- reg_sub and reg_error are elsewhere + * + * Copyright (c) 1986 by University of Toronto. + * Written by Henry Spencer. Not derived from licensed software. + * + * Permission is granted to anyone to use this software for any + * purpose on any computer system, and to redistribute it freely, + * subject to the following restrictions: + * + * 1. The author is not responsible for the consequences of use of + * this software, no matter how awful, even if they arise + * from defects in it. + * + * 2. The origin of this software must not be misrepresented, either + * by explicit claim or by omission. + * + * 3. Altered versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * Beware that some of this code is subtly aware of the way operator + * precedence is structured in regular expressions. Serious changes in + * regular-expression syntax might require a total rethink. + */ + + /* Jan Labanowski made some small modifications which are marked in the + text (jkl) + */ + +#include "paths.h" /* jkl */ +/* #include <regexp.h> ---- originally */ +#include "reg_exp.h" /* modified by jkl */ +/* #include "reg_magic.h" regmagic included in reg_exp.h, jkl */ + +/* + * The "internal use only" fields in reg_exp.h are present to pass info from + * compile to execute that permits the execute phase to run lots faster on + * simple cases. They are: + * + * regstart char that must begin a match; '\0' if none obvious + * reganch is the match anchored (at beginning-of-line only)? + * regmust string (pointer into program) that match must include, or NULL + * regmlen length of regmust string + * + * Regstart and reganch permit very fast decisions on suitable starting points + * for a match, cutting down the work a lot. Regmust permits fast rejection + * of lines that cannot possibly match. The regmust tests are costly enough + * that reg_comp() supplies a regmust only if the r.e. contains something + * potentially expensive (at present, the only such thing detected is * or + + * at the start of the r.e., which can involve a lot of backup). Regmlen is + * supplied because the test in reg_exec() needs it and reg_comp() is computing + * it anyway. + */ + +/* + * Structure for reg_exp "program". This is essentially a linear encoding + * of a nondeterministic finite-state machine (aka syntax charts or + * "railroad normal form" in parsing technology). Each node is an opcode + * plus a "next" pointer, possibly plus an operand. "Next" pointers of + * all nodes except BRANCH implement concatenation; a "next" pointer with + * a BRANCH on both ends of it is connecting two alternatives. (Here we + * have one of the subtle syntax dependencies: an individual BRANCH (as + * opposed to a collection of them) is never concatenated with anything + * because of operator precedence.) The operand of some types of node is + * a literal string; for others, it is a node leading into a sub-FSM. In + * particular, the operand of a BRANCH node is the first node of the branch. + * (NB this is *not* a tree structure: the tail of the branch connects + * to the thing following the set of BRANCHes.) The opcodes are: + */ + +/* definition number opnd? meaning */ +#define END 0 /* no End of program. */ +#define BOL 1 /* no Match "" at beginning of line. */ +#define EOL 2 /* no Match "" at end of line. */ +#define ANY 3 /* no Match any one character. */ +#define ANYOF 4 /* str Match any character in this string. */ +#define ANYBUT 5 /* str Match any character not in this string. */ +#define BRANCH 6 /* node Match this alternative, or the next... */ +#define BACK 7 /* no Match "", "next" ptr points backward. */ +#define EXACTLY 8 /* str Match this string. */ +#define NOTHING 9 /* no Match empty string. */ +#define STAR 10 /* node Match this (simple) thing 0 or more times. */ +#define PLUS 11 /* node Match this (simple) thing 1 or more times. */ +#define OPEN 20 /* no Mark this point in input as start of #n. */ + /* OPEN+1 is number 1, etc. */ +#define CLOSE 30 /* no Analogous to OPEN. */ + +/* + * Opcode notes: + * + * BRANCH The set of branches constituting a single choice are hooked + * together with their "next" pointers, since precedence prevents + * anything being concatenated to any individual branch. The + * "next" pointer of the last BRANCH in a choice points to the + * thing following the whole choice. This is also where the + * final "next" pointer of each individual branch points; each + * branch starts with the operand node of a BRANCH node. + * + * BACK Normal "next" pointers all implicitly point forward; BACK + * exists to make loop structures possible. + * + * STAR,PLUS '?', and complex '*' and '+', are implemented as circular + * BRANCH structures using BACK. Simple cases (one character + * per match) are implemented with STAR and PLUS for speed + * and to minimize recursive plunges. + * + * OPEN,CLOSE ...are numbered at compile time. + */ + +/* + * A node is one char of opcode followed by two chars of "next" pointer. + * "Next" pointers are stored as two 8-bit pieces, high order first. The + * value is a positive offset from the opcode of the node containing it. + * An operand, if any, simply follows the node. (Note that much of the + * code generation knows about this implicit relationship.) + * + * Using two bytes for the "next" pointer is vast overkill for most things, + * but allows patterns to get big without disasters. + */ +#define OP(p) (*(p)) +#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) +#define OPERAND(p) ((p) + 3) + +/* + * See reg_magic.h for one further detail of program structure. + */ + + +/* + * Utility definitions. + */ +/* replaced this with my intcode() routine in translit.c , jkl + #ifndef CHARBITS + #define UCHARAT(p) ((int)*(unsigned char *)(p)) + #else + #define UCHARAT(p) ((int)*(p)&CHARBITS) + #endif +*/ +#define UCHARAT(p) (intcode(*(p))) +extern int intcode(); + +#if STRCHR +#else +#define strchr indexfun + extern int indexfun(); +#endif + +#define FAIL(m) { reg_error(m); return(NULL); } +#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') +/* #define META "^$.[()|?+*\\" */ +#define META ".[()|?+*\\" /* disabled ^$ jkl */ + +/* + * Flags to be passed up and down. + */ +#define HASWIDTH 01 /* Known never to match null string. */ +#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ +#define SPSTART 04 /* Starts with * or +. */ +#define WORST 0 /* Worst case. */ + +/* + * Global work variables for reg_comp(). + */ +static char *regparse; /* Input-scan pointer. */ +static int regnpar; /* () count. */ +static char regdummy; +static char *regcode; /* Code-emit pointer; ®dummy = don't. */ +static long regsize; /* Code size. */ + +/* + * Forward declarations for reg_comp()'s friends. + */ +#if STATICFUN +#define STATIC static +#else +#define STATIC +#endif + +STATIC char *reg(); +STATIC char *regbranch(); +STATIC char *regpiece(); +STATIC char *regatom(); +STATIC char *regnode(); +STATIC char *regnext(); +STATIC void regc(); +STATIC void reginsert(); +STATIC void regtail(); +STATIC void regoptail(); + + +/* + - reg_comp - compile a regular expression into internal code + * + * We can't allocate space until we know how big the compiled form will be, + * but we can't compile it (and thus know how big it is) until we've got a + * place to put the code. So we cheat: we compile it twice, once with code + * generation turned off and size counting turned on, and once "for real". + * This also means that we don't allocate space until we are sure that the + * thing really will compile successfully, and we never have to move the + * code and thus invalidate pointers into it. (Note that it has to be in + * one piece because free() must be able to free it all.) + * + * Beware that the optimization-preparation code in here knows about some + * of the structure of the compiled reg_exp. + */ +reg_exp * +reg_comp(exp) +char *exp; +{ + register reg_exp *r; + register char *scan; + register char *longest; + register int len; + int flags; +/* extern char *malloc(); --- */ + + if (exp == NULL) + FAIL("NULL argument"); + + /* First pass: determine size, legality. */ + regparse = exp; + regnpar = 1; + regsize = 0L; + regcode = ®dummy; + regc(MAGIC); + if (reg(0, &flags) == NULL) + return(NULL); + + /* Small enough for pointer-storage convention? */ + if (regsize >= 32767L) /* Probably could be 65535L. */ + FAIL("regexp too big"); + + /* Allocate space. */ + r = (reg_exp *)malloc(sizeof(reg_exp) + (unsigned)regsize); + if (r == NULL) + FAIL("out of space"); + + /* Second pass: emit code. */ + regparse = exp; + regnpar = 1; + regcode = r->program; + regc(MAGIC); + if (reg(0, &flags) == NULL) + return(NULL); + + /* Dig out information for optimizations. */ + r->regstart = '\0'; /* Worst-case defaults. */ + r->reganch = 0; + r->regmust = NULL; + r->regmlen = 0; + scan = r->program+1; /* First BRANCH. */ + if (OP(regnext(scan)) == END) { /* Only one top-level choice. */ + scan = OPERAND(scan); + + /* Starting-point info. */ + if (OP(scan) == EXACTLY) + r->regstart = *OPERAND(scan); + else if (OP(scan) == BOL) + r->reganch++; + + /* + * If there's something expensive in the r.e., find the + * longest literal string that must appear and make it the + * regmust. Resolve ties in favor of later strings, since + * the regstart check works with the beginning of the r.e. + * and avoiding duplication strengthens checking. Not a + * strong reason, but sufficient in the absence of others. + */ + if (flags&SPSTART) { + longest = NULL; + len = 0; + for (; scan != NULL; scan = regnext(scan)) + if ((OP(scan) == EXACTLY) && + (strlen(OPERAND(scan)) >= len)) { + longest = OPERAND(scan); + len = strlen(OPERAND(scan)); + } + r->regmust = longest; + r->regmlen = len; + } + } + + return(r); +} + +/* + - reg - regular expression, i.e. main body or parenthesized thing + * + * Caller must absorb opening parenthesis. + * + * Combining parenthesis handling with the base level of regular expression + * is a trifle forced, but the need to tie the tails of the branches to what + * follows makes it hard to avoid. + */ +STATIC char * +reg(paren, flagp) +int paren; /* Parenthesized? */ +int *flagp; +{ + register char *ret; + register char *br; + register char *ender; + register int parno; + int flags; + + *flagp = HASWIDTH; /* Tentatively. */ + + /* Make an OPEN node, if parenthesized. */ + if (paren) { + if (regnpar >= NSUBEXP) + FAIL("too many ()"); + parno = regnpar; + regnpar++; + ret = regnode(OPEN+parno); + } else + ret = NULL; + + /* Pick up the branches, linking them together. */ + br = regbranch(&flags); + if (br == NULL) + return(NULL); + if (ret != NULL) + regtail(ret, br); /* OPEN -> first. */ + else + ret = br; + if (!(flags&HASWIDTH)) + *flagp &= ~HASWIDTH; + *flagp |= flags&SPSTART; + while (*regparse == '|') { + regparse++; + br = regbranch(&flags); + if (br == NULL) + return(NULL); + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags&HASWIDTH)) + *flagp &= ~HASWIDTH; + *flagp |= flags&SPSTART; + } + + /* Make a closing node, and hook it on the end. */ + ender = regnode((paren) ? CLOSE+parno : END); + regtail(ret, ender); + + /* Hook the tails of the branches to the closing node. */ + for (br = ret; br != NULL; br = regnext(br)) + regoptail(br, ender); + + /* Check for proper termination. */ + if (paren && *regparse++ != ')') { + FAIL("unmatched ()"); + } else if (!paren && *regparse != '\0') { + if (*regparse == ')') { + FAIL("unmatched ()"); + } else + FAIL("junk on end"); /* "Can't happen". */ + /* NOTREACHED */ + } + + return(ret); +} + +/* + - regbranch - one alternative of an | operator + * + * Implements the concatenation operator. + */ +STATIC char * +regbranch(flagp) +int *flagp; +{ + register char *ret; + register char *chain; + register char *latest; + int flags; + + *flagp = WORST; /* Tentatively. */ + + ret = regnode(BRANCH); + chain = NULL; + while (*regparse != '\0' && *regparse != '|' && *regparse != ')') { + latest = regpiece(&flags); + if (latest == NULL) + return(NULL); + *flagp |= flags&HASWIDTH; + if (chain == NULL) /* First piece. */ + *flagp |= flags&SPSTART; + else + regtail(chain, latest); + chain = latest; + } + if (chain == NULL) /* Loop ran zero times. */ + (void) regnode(NOTHING); + + return(ret); +} + +/* + - regpiece - something followed by possible [*+?] + * + * Note that the branching code sequences used for ? and the general cases + * of * and + are somewhat optimized: they use the same NOTHING node as + * both the endmarker for their branch list and the body of the last branch. + * It might seem that this node could be dispensed with entirely, but the + * endmarker role is not redundant. + */ +STATIC char * +regpiece(flagp) +int *flagp; +{ + register char *ret; + register char op; + register char *next; + int flags; + + ret = regatom(&flags); + if (ret == NULL) + return(NULL); + + op = *regparse; + if (!ISMULT(op)) { + *flagp = flags; + return(ret); + } + + if (!(flags&HASWIDTH) && op != '?') + FAIL("*+ operand could be empty"); + *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH); + + if (op == '*' && (flags&SIMPLE)) + reginsert(STAR, ret); + else if (op == '*') { + /* Emit x* as (x&|), where & means "self". */ + reginsert(BRANCH, ret); /* Either x */ + regoptail(ret, regnode(BACK)); /* and loop */ + regoptail(ret, ret); /* back */ + regtail(ret, regnode(BRANCH)); /* or */ + regtail(ret, regnode(NOTHING)); /* null. */ + } else if (op == '+' && (flags&SIMPLE)) + reginsert(PLUS, ret); + else if (op == '+') { + /* Emit x+ as x(&|), where & means "self". */ + next = regnode(BRANCH); /* Either */ + regtail(ret, next); + regtail(regnode(BACK), ret); /* loop back */ + regtail(next, regnode(BRANCH)); /* or */ + regtail(ret, regnode(NOTHING)); /* null. */ + } else if (op == '?') { + /* Emit x? as (x|) */ + reginsert(BRANCH, ret); /* Either x */ + regtail(ret, regnode(BRANCH)); /* or */ + next = regnode(NOTHING); /* null. */ + regtail(ret, next); + regoptail(ret, next); + } + regparse++; + if (ISMULT(*regparse)) + FAIL("nested *?+"); + + return(ret); +} + +/* + - regatom - the lowest level + * + * Optimization: gobbles an entire sequence of ordinary characters so that + * it can turn them into a single node, which is smaller to store and + * faster to run. Backslashed characters are exceptions, each becoming a + * separate node; the code is simpler that way and it's not worth fixing. + */ +STATIC char * +regatom(flagp) +int *flagp; +{ + register char *ret; + int flags; + + *flagp = WORST; /* Tentatively. */ + + switch (*regparse++) { +/* the ^ and $ hooks are disabled by jkl */ +/* case '^': + ret = regnode(BOL); + break; + case '$': + ret = regnode(EOL); + break; */ + case '.': + ret = regnode(ANY); + *flagp |= HASWIDTH|SIMPLE; + break; + case '[': { + register int class; + register int classend; + + if (*regparse == '^') { /* Complement of range. */ + ret = regnode(ANYBUT); + regparse++; + } else + ret = regnode(ANYOF); + if (*regparse == ']' || *regparse == '-') + regc(*regparse++); + while (*regparse != '\0' && *regparse != ']') { + if (*regparse == '-') { + regparse++; + if (*regparse == ']' || *regparse == '\0') + regc('-'); + else { + class = UCHARAT(regparse-2)+1; + classend = UCHARAT(regparse); + if (class > classend+1) + FAIL("invalid [] range"); + for (; class <= classend; class++) + regc(class); + regparse++; + } + } else + regc(*regparse++); + } + regc('\0'); + if (*regparse != ']') + FAIL("unmatched []"); + regparse++; + *flagp |= HASWIDTH|SIMPLE; + } + break; + case '(': + ret = reg(1, &flags); + if (ret == NULL) + return(NULL); + *flagp |= flags&(HASWIDTH|SPSTART); + break; + case '\0': + case '|': + case ')': + FAIL("internal urp"); /* Supposed to be caught earlier. */ + break; + case '?': + case '+': + case '*': + FAIL("?+* follows nothing"); + break; + case '\\': + if (*regparse == '\0') + FAIL("trailing \\"); + ret = regnode(EXACTLY); + regc(*regparse++); + regc('\0'); + *flagp |= HASWIDTH|SIMPLE; + break; + default: { + register int len; + register char ender; + + regparse--; + len = strcspn(regparse, META); + if (len <= 0) + FAIL("internal disaster"); + ender = *(regparse+len); + if (len > 1 && ISMULT(ender)) + len--; /* Back off clear of ?+* operand. */ + *flagp |= HASWIDTH; + if (len == 1) + *flagp |= SIMPLE; + ret = regnode(EXACTLY); + while (len > 0) { + regc(*regparse++); + len--; + } + regc('\0'); + } + break; + } + + return(ret); +} + +/* + - regnode - emit a node + */ +STATIC char * /* Location. */ +regnode(op) +char op; +{ + register char *ret; + register char *ptr; + + ret = regcode; + if (ret == ®dummy) { + regsize += 3; + return(ret); + } + + ptr = ret; + *ptr++ = op; + *ptr++ = '\0'; /* Null "next" pointer. */ + *ptr++ = '\0'; + regcode = ptr; + + return(ret); +} + +/* + - regc - emit (if appropriate) a byte of code + */ +STATIC void +regc(b) +char b; +{ + if (regcode != ®dummy) + *regcode++ = b; + else + regsize++; +} + +/* + - reginsert - insert an operator in front of already-emitted operand + * + * Means relocating the operand. + */ +STATIC void +reginsert(op, opnd) +char op; +char *opnd; +{ + register char *src; + register char *dst; + register char *place; + + if (regcode == ®dummy) { + regsize += 3; + return; + } + + src = regcode; + regcode += 3; + dst = regcode; + while (src > opnd) + *--dst = *--src; + + place = opnd; /* Op node, where operand used to be. */ + *place++ = op; + *place++ = '\0'; + *place++ = '\0'; +} + +/* + - regtail - set the next-pointer at the end of a node chain + */ +STATIC void +regtail(p, val) +char *p; +char *val; +{ + register char *scan; + register char *temp; + register int offset; + + if (p == ®dummy) + return; + + /* Find last node. */ + scan = p; + for (;;) { + temp = regnext(scan); + if (temp == NULL) + break; + scan = temp; + } + + if (OP(scan) == BACK) + offset = scan - val; + else + offset = val - scan; + *(scan+1) = (offset>>8)&0377; + *(scan+2) = offset&0377; +} + +/* + - regoptail - regtail on operand of first argument; nop if operandless + */ +STATIC void +regoptail(p, val) +char *p; +char *val; +{ + /* "Operandless" and "op != BRANCH" are synonymous in practice. */ + if (p == NULL || p == ®dummy || OP(p) != BRANCH) + return; + regtail(OPERAND(p), val); +} + +/* + * regexec and friends + */ + +/* + * Global work variables for reg_exec(). + */ +static char *reginput; /* String-input pointer. */ +static char *regbol; /* Beginning of input, for ^ check. */ +static char **regstartp; /* Pointer to startp array. */ +static char **regendp; /* Ditto for endp. */ + +/* + * Forwards. + */ +int reg_try(); /* jkl, took "static" out, so it is known to the linker */ +STATIC int regmatch(); +STATIC int regrepeat(); + +#ifdef DEBUG +int regnarrate = 0; +void regdump(); +STATIC char *regprop(); +#endif + +/* + - reg_exec - match a regexp against a string + */ +int +reg_exec(prog, string) +register reg_exp *prog; +register char *string; +{ + register char *s; +/* extern char *strchr(); jkl */ + + /* Be paranoid... */ + if (prog == NULL || string == NULL) { + reg_error("NULL parameter"); + return(0); + } + + /* Check validity of program. */ + if (UCHARAT(prog->program) != MAGIC) { + reg_error("corrupted program"); + return(0); + } + + /* If there is a "must appear" string, look for it. */ + if (prog->regmust != NULL) { + s = string; + while ((s = strchr(s, prog->regmust[0])) != NULL) { + if (strncmp(s, prog->regmust, prog->regmlen) == 0) + break; /* Found it. */ + s++; + } + if (s == NULL) /* Not present. */ + return(0); + } + + /* Mark beginning of line for ^ . */ + regbol = string; + + /* Simplest case: anchored match need be tried only once. */ + if (prog->reganch) + return(reg_try(prog, string)); + + /* Messy cases: unanchored match. */ + s = string; + if (prog->regstart != '\0') + /* We know what char it must start with. */ + while ((s = strchr(s, prog->regstart)) != NULL) { + if (reg_try(prog, s)) + return(1); + s++; + } + else + /* We don't -- general case. */ + do { + if (reg_try(prog, s)) + return(1); + } while (*s++ != '\0'); + + /* Failure. */ + return(0); +} + +/* + - reg_try - try match at specific point + */ +int /* 0 failure, 1 success */ +reg_try(prog, string) +reg_exp *prog; +char *string; +{ + register int i; + register char **sp; + register char **ep; + + reginput = string; + regstartp = prog->startp; + regendp = prog->endp; + + sp = prog->startp; + ep = prog->endp; + for (i = NSUBEXP; i > 0; i--) { + *sp++ = NULL; + *ep++ = NULL; + } + if (regmatch(prog->program + 1)) { + prog->startp[0] = string; + prog->endp[0] = reginput; + return(1); + } else + return(0); +} + +/* + - regmatch - main matching routine + * + * Conceptually the strategy is simple: check to see whether the current + * node matches, call self recursively to see whether the rest matches, + * and then act accordingly. In practice we make some effort to avoid + * recursion, in particular by going through "ordinary" nodes (that don't + * need to know whether the rest of the match failed) by a loop instead of + * by recursion. + */ +STATIC int /* 0 failure, 1 success */ +regmatch(prog) +char *prog; +{ + register char *scan; /* Current node. */ + char *next; /* Next node. */ +/* extern char *strchr(); --- jkl */ + + scan = prog; +#ifdef DEBUG + if (scan != NULL && regnarrate) + fprintf(stderr, "%s(\n", regprop(scan)); +#endif + while (scan != NULL) { +#ifdef DEBUG + if (regnarrate) + fprintf(stderr, "%s...\n", regprop(scan)); +#endif + next = regnext(scan); + + switch (OP(scan)) { + case BOL: + if (reginput != regbol) + return(0); + break; + case EOL: + if (*reginput != '\0') + return(0); + break; + case ANY: + if (*reginput == '\0') + return(0); + reginput++; + break; + case EXACTLY: { + register int len; + register char *opnd; + + opnd = OPERAND(scan); + /* Inline the first character, for speed. */ + if (*opnd != *reginput) + return(0); + len = strlen(opnd); + if (len > 1 && strncmp(opnd, reginput, len) != 0) + return(0); + reginput += len; + } + break; + case ANYOF: + if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL) + return(0); + reginput++; + break; + case ANYBUT: + if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL) + return(0); + reginput++; + break; + case NOTHING: + break; + case BACK: + break; + case OPEN+1: + case OPEN+2: + case OPEN+3: + case OPEN+4: + case OPEN+5: + case OPEN+6: + case OPEN+7: + case OPEN+8: + case OPEN+9: { + register int no; + register char *save; + + no = OP(scan) - OPEN; + save = reginput; + + if (regmatch(next)) { + /* + * Don't set startp if some later + * invocation of the same parentheses + * already has. + */ + if (regstartp[no] == NULL) + regstartp[no] = save; + return(1); + } else + return(0); + } + break; + case CLOSE+1: + case CLOSE+2: + case CLOSE+3: + case CLOSE+4: + case CLOSE+5: + case CLOSE+6: + case CLOSE+7: + case CLOSE+8: + case CLOSE+9: { + register int no; + register char *save; + + no = OP(scan) - CLOSE; + save = reginput; + + if (regmatch(next)) { + /* + * Don't set endp if some later + * invocation of the same parentheses + * already has. + */ + if (regendp[no] == NULL) + regendp[no] = save; + return(1); + } else + return(0); + } + break; + case BRANCH: { + register char *save; + + if (OP(next) != BRANCH) /* No choice. */ + next = OPERAND(scan); /* Avoid recursion. */ + else { + do { + save = reginput; + if (regmatch(OPERAND(scan))) + return(1); + reginput = save; + scan = regnext(scan); + } while (scan != NULL && OP(scan) == BRANCH); + return(0); + /* NOTREACHED */ + } + } + break; + case STAR: + case PLUS: { + register char nextch; + register int no; + register char *save; + register int min; + + /* + * Lookahead to avoid useless match attempts + * when we know what character comes next. + */ + nextch = '\0'; + if (OP(next) == EXACTLY) + nextch = *OPERAND(next); + min = (OP(scan) == STAR) ? 0 : 1; + save = reginput; + no = regrepeat(OPERAND(scan)); + while (no >= min) { + /* If it could work, try it. */ + if (nextch == '\0' || *reginput == nextch) + if (regmatch(next)) + return(1); + /* Couldn't or didn't -- back up. */ + no--; + reginput = save + no; + } + return(0); + } + break; + case END: + return(1); /* Success! */ + break; + default: + reg_error("memory corruption"); + return(0); + break; + } + + scan = next; + } + + /* + * We get here only if there's trouble -- normally "case END" is + * the terminating point. + */ + reg_error("corrupted pointers"); + return(0); +} + +/* + - regrepeat - repeatedly match something simple, report how many + */ +STATIC int +regrepeat(p) +char *p; +{ + register int count = 0; + register char *scan; + register char *opnd; + + scan = reginput; + opnd = OPERAND(p); + switch (OP(p)) { + case ANY: + count = strlen(scan); + scan += count; + break; + case EXACTLY: + while (*opnd == *scan) { + count++; + scan++; + } + break; + case ANYOF: + while ((*scan != '\0') && /* paranthetized by jkl */ + (strchr(opnd, *scan) != (char *)NULL)) { + count++; + scan++; + } + break; + case ANYBUT: + while (*scan != '\0' && strchr(opnd, *scan) == NULL) { + count++; + scan++; + } + break; + default: /* Oh dear. Called inappropriately. */ + reg_error("internal foulup"); + count = 0; /* Best compromise. */ + break; + } + reginput = scan; + + return(count); +} + +/* + - regnext - dig the "next" pointer out of a node + */ +STATIC char * +regnext(p) +register char *p; +{ + register int offset; + + if (p == ®dummy) + return(NULL); + + offset = NEXT(p); + if (offset == 0) + return(NULL); + + if (OP(p) == BACK) + return(p-offset); + else + return(p+offset); +} + +#ifdef DEBUG + +STATIC char *regprop(); + +/* + - regdump - dump a regexp onto stdout in vaguely comprehensible form + */ +void +regdump(r) +reg_exp *r; +{ + register char *s; + register char op = EXACTLY; /* Arbitrary non-END op. */ + register char *next; +/* extern char *strchr(); ---jkl */ + + + s = r->program + 1; + while (op != END) { /* While that wasn't END last time... */ + op = OP(s); + printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */ + next = regnext(s); + if (next == NULL) /* Next ptr. */ + printf("(0)"); + else + printf("(%d)", (s-r->program)+(next-s)); + s += 3; + if (op == ANYOF || op == ANYBUT || op == EXACTLY) { + /* Literal string, where present. */ + while (*s != '\0') { + putchar(*s); + s++; + } + s++; + } + putchar('\n'); + } + + /* Header fields of interest. */ + if (r->regstart != '\0') + printf("start `%c' ", r->regstart); + if (r->reganch) + printf("anchored "); + if (r->regmust != NULL) + printf("must have \"%s\"", r->regmust); + printf("\n"); +} + +/* + - regprop - printable representation of opcode + */ +STATIC char * +regprop(op) +char *op; +{ + register char *p; + static char buf[50]; + + (void) strcpy(buf, ":"); + + switch (OP(op)) { + case BOL: + p = "BOL"; + break; + case EOL: + p = "EOL"; + break; + case ANY: + p = "ANY"; + break; + case ANYOF: + p = "ANYOF"; + break; + case ANYBUT: + p = "ANYBUT"; + break; + case BRANCH: + p = "BRANCH"; + break; + case EXACTLY: + p = "EXACTLY"; + break; + case NOTHING: + p = "NOTHING"; + break; + case BACK: + p = "BACK"; + break; + case END: + p = "END"; + break; + case OPEN+1: + case OPEN+2: + case OPEN+3: + case OPEN+4: + case OPEN+5: + case OPEN+6: + case OPEN+7: + case OPEN+8: + case OPEN+9: + sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); + p = NULL; + break; + case CLOSE+1: + case CLOSE+2: + case CLOSE+3: + case CLOSE+4: + case CLOSE+5: + case CLOSE+6: + case CLOSE+7: + case CLOSE+8: + case CLOSE+9: + sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); + p = NULL; + break; + case STAR: + p = "STAR"; + break; + case PLUS: + p = "PLUS"; + break; + default: + reg_error("corrupted opcode"); + break; + } + if (p != NULL) + (void) strcat(buf, p); + return(buf); +} +#endif + +/* + * The following is provided for those people who do not have strcspn() in + * their C libraries. They should get off their butts and do something + * about it; at least one public-domain implementation of those (highly + * useful) string routines has been published on Usenet. + */ +#if STRCSPN +#else + +/* + * strcspn - find length of initial segment of s1 consisting entirely + * of characters not from s2 + */ + +STATIC int +strcspn(s1, s2) +char *s1; +char *s2; +{ + register char *scan1; + register char *scan2; + register int count; + + count = 0; + for (scan1 = s1; *scan1 != '\0'; scan1++) { + for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */ + if (*scan1 == *scan2++) + return(count); + count++; + } + return(count); +} +#endif diff --git a/support/translit/reg_exp.h b/support/translit/reg_exp.h new file mode 100644 index 0000000000..6aac35c683 --- /dev/null +++ b/support/translit/reg_exp.h @@ -0,0 +1,28 @@ +/* + * Definitions etc. for regexp(3) routines. + * + * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], + * not the System V one. + */ +#define NSUBEXP 10 +typedef struct { + char *startp[NSUBEXP]; + char *endp[NSUBEXP]; + char regstart; /* Internal use only. */ + char reganch; /* Internal use only. */ + char *regmust; /* Internal use only. */ + int regmlen; /* Internal use only. */ + char program[1]; /* Unwarranted chumminess with compiler. */ +} reg_exp; + +extern reg_exp *reg_comp(); +extern int reg_exec(); +extern int reg_try(); +extern void reg_sub(); +extern void reg_error(); + +/* + * The first byte of the regexp internal "program" is actually this magic + * number; the start node begins in the second byte. + */ +#define MAGIC 0234 diff --git a/support/translit/reg_sub.c b/support/translit/reg_sub.c new file mode 100644 index 0000000000..1348406342 --- /dev/null +++ b/support/translit/reg_sub.c @@ -0,0 +1,87 @@ +/* + * regsub + * + * Copyright (c) 1986 by University of Toronto. + * Written by Henry Spencer. Not derived from licensed software. + * + * Permission is granted to anyone to use this software for any + * purpose on any computer system, and to redistribute it freely, + * subject to the following restrictions: + * + * 1. The author is not responsible for the consequences of use of + * this software, no matter how awful, even if they arise + * from defects in it. + * + * 2. The origin of this software must not be misrepresented, either + * by explicit claim or by omission. + * + * 3. Altered versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + */ + +#include "paths.h" +#include "reg_exp.h" /* modified by jkl */ +/* #include "reg_magic.h" reg_magic included in reg_exp.h , jkl */ + +/* substituted with my charcode routine + #ifndef CHARBITS + #define UCHARAT(p) ((int)*(unsigned char *)(p)) + #else + #define UCHARAT(p) ((int)*(p)&CHARBITS) + #endif +*/ + +#define UCHARAT(p) (intcode(*(p))) +extern int intcode(); + +/* + - reg_sub - perform substitutions after a regexp match + */ +void +reg_sub(prog, source, dest) +reg_exp *prog; +char *source; +char *dest; +{ + register char *src; + register char *dst; + register char c; + register int no; + register int len; +/* extern char *strncpy(); jkl */ + + if (prog == NULL || source == NULL || dest == NULL) { + reg_error("NULL parm to regsub"); + return; + } + if (UCHARAT(prog->program) != MAGIC) { + reg_error("damaged regexp fed to regsub"); + return; + } + + src = source; + dst = dest; + while ((c = *src++) != '\0') { + if (c == '&') + no = 0; + else if (c == '\\' && '0' <= *src && *src <= '9') + no = *src++ - '0'; + else + no = -1; + + if (no < 0) { /* Ordinary character. */ + if (c == '\\' && (*src == '\\' || *src == '&')) + c = *src++; + *dst++ = c; + } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) { + len = prog->endp[no] - prog->startp[no]; + (void) strncpy(dst, prog->startp[no], len); + dst += len; + if (len != 0 && *(dst-1) == '\0') {/* strncpy hit NUL. */ + reg_error("damaged match string"); + return; + } + } + } + *dst++ = '\0'; +} diff --git a/support/translit/tex-koi8.rus b/support/translit/tex-koi8.rus new file mode 100644 index 0000000000..9d425642dc --- /dev/null +++ b/support/translit/tex-koi8.rus @@ -0,0 +1,236 @@ +# Jan Labanowski, jkl@osc.edu, Jan. 10, 1992 +# File tex_koi8.rus + +# This is a transliteration data file for converting from Latex to KOI8 +# as used by RELCOM (GOST 19768-74). It assumes that the sister file: +# koi8-latex.rus was used to obtain the LaTeX file. +# Since Latex is a program, frequently complicated, it is probably possible +# to convert LaTeX to KOI8 only with TeX. However, if you have a simple +# LaTeX document, without math, tables, different font sized and shapes, +# you can easily convert it to KOI8 tex, by listing symbols for Russian +# lettes on the left side and appropriate KOI8 codes on the right. +# Since there are many possible assignements in LaTeX, you need to +# modify this file to the ones actually used. First of all, some other +# symbols may be used to represent Russian letters. I included some more +# popular sequences, but there might be more, which I am not aware of. +# The TeX tranliteration sequences follow AMS cyrillic convention for +# WNCYR fonts with cyracc.def file +# To be used with translit.c program by Jan Labanowski. For a format of +# this file consult translit documentation + + 1 file version number + + " " # string delimiters + [ ] # list delimites + { } # regular expression delimiters + + +#starting sequence +"" + + +#ending sequence +"" + + + 4 # number input SHIFT sequences +# The last two of the input "character sets" are used simply to delete all +# characters from LaTeX preamble and the \end{document} closing +# For set 2, note that \cyr may be followed by spaces or new lines +# end preceded with some LaTeX escape sequences + +#SO-match #SO-subs #Nest-up #Nest-down #SI-match #SI-subs + "" "" "" "" "" "" #Latin letters + +{{\\cyr[ \0x09-\0x0D]+} + "" "{" "}" "}" "" #cyrillic + +"\documentstyle" + "" "" "" {\begin{document\0x7D[\0d09-\15]*} "" + +"\end{document}" "" "" "" "" "" + + + 0 # number of output SHIFT sequences, only one set of output characters + +# conversion table +# inp_set inp_seq out_set out_seq + + 3 [\001-\255] 0 "\00" # delete LaTeX preamble + 4 [\001-\255] 0 "\00" # delete end{document} + + 1 [A-Za-z] 0 [A-Za-z] #Latin letters A-Z and a-z + +# If double backslash is followed by new line, skip the double backslash + 0 {\\\\[\0x09-\0x0d]*} 0 "\0x0D\0x0A" #restore new lines + + 0 "\\040" 0 " " # protected space + + +# Convert some special TeX characters + +# these do not require going out of {\cyr ....} + 0 "$[$" 0 "[" + 0 "$]$" 0 "]" + 0 "$\wedge$" 0 "^" + 0 "$\lbrace$" 0 "{" + 0 "$\rbrace$" 0 "}" + 0 "$\sim$" 0 "~" + 0 "$\backslash$" 0 "\" + 0 "$\mid$" 0 "|" + 0 "$\star$" 0 "*" + 0 "$<$" 0 "<" + 0 "$>$" 0 ">" + 0 "\$" 0 "$" + 0 "\%" 0 "%" + +# These were represented correctly only in Latin charset + 1 "\_" 0 "_" + 1 "\&" 0 "&" + 1 "\#" 0 "#" + 1 "\@" 0 "@" + + +# Cyrillic letters + +# note that TS and ts sequences are checked before the \cydot is removed + + 2 {\\T[Ss][ \0x09-\0x0d]*} 0 "\0xE3" + 2 {T[Ss]} 0 "\0xE3" # Tse + + 2 {\\ts][ \0x09-\0x0d]*} 0 "\0xC3" + 2 {t[Ss]} 0 "\0xC3" # tse + + 2 {\\S[Hh][Cc][Hh][ \0x09-\0x0d]*} 0 "\0xFD" + 2 {S[Hh][Cc][Hh]} 0 "\0xFD" + + 2 {\\s[Hh][Cc][Hh][ \0x09-\0x0d]*} 0 "\0xDD" + 2 {s[Hh][Cc][Hh]} 0 "\0xDD" + + 2 {\\Cdprime[ \0x09-\0x0d]*} 0 "\0xFF" # Tverdyj znak + 2 {\\T[Zz][ \0x09-\0x0d]*} 0 "\0xFF" + + 2 {\\Cprime[ \0x09-\0x0d]*} 0 "\0xF8" # Myagkij znak + 2 {\\M[Zz][ \0x09-\0x0d]*} 0 "\0xF8" + + 2 {\\cdprime[ \0x09-\0x0d]*} 0 "\0xDF" # tverdyj znak + 2 {\\tz[ \0x09-\0x0d]*} 0 "\0xDF" + + 2 {\\cprime[ \0x09-\0x0d]*} 0 "\0xD8" # myagkij znak + 2 {\\mz[ \0x09-\0x0d]*} 0 "\0xD8" + + 2 {\\u[ \0x09-\0x0d]*I} 0 "\0xEA" # I kratkoje + 2 "\u{I}" 0 "\0xEA" + 2 {\\[Uu]I[ \0x09-\0x0d]*} 0 "\0xEA" + + 2 {\\u[ \0x09-\0x0d]*i} 0 "\0xCA" # i kratkoje + 2 {\\ui[ \0x09-\0x0d]*} 0 "\0xCA" + 2 "\u{i}" 0 "\0xCA" + + 2 {\\`[ \0x09-\0x0d]*E} 0 "\0xFC" # E obortnoye + 2 "\`{E}" 0 "\0xFC" + + 2 {\\`[ \0x09-\0x0d]*e} 0 "\0xDC" # e oborotnoye + 2 "\`{e}" 0 "\0xDC" + + 2 {\\K[Hh][ \0x09-\0x0d]*} 0 "\0xE8" + 2 {K[Hh]} 0 "\0xE8" + + 2 {\\k[Hh][ \0x09-\0x0d]*} 0 "\0xC8" + 2 {k[Hh]} 0 "\0xC8" + + 2 {\\T[Cc][Hh][ \0x09-\0x0d]*} 0 "\0xFE" + 2 {\\C[Hh][ \0x09-\0x0d]*} 0 "\0xFE" + 2 {C[Hh]} 0 "\0xFE" + + + 2 {\\S[Hh][ \0x09-\0x0d]*} 0 "\0xFB" + 2 {S[Hh]} 0 "\0xFB" + + 2 {\\c[Hh][ \0x09-\0x0d]*} 0 "\0xDE" + 2 {\\t[Cc][Hh][ \0x09-\0x0d]*} 0 "\0xDE" + 2 {c[Hh]} 0 "\0xDE" + + 2 {\\s[Hh][ \0x09-\0x0d]*} 0 "\0xDB" + 2 {s[Hh]} 0 "\0xDB" + + 2 {\\Z[Hh][ \0x09-\0x0d]*} 0 "\0xF6" + 2 {Z[Hh]} 0 "\0xF6" + + 2 {\\z[Hh][ \0x09-\0x0d]*} 0 "\0xD6" + 2 {z[Hh]} 0 "\0xD6" + + 2 {\\Y[Uu][ \0x09-\0x0d]*} 0 "\0xE0" + 2 {Y[Uu]} 0 "\0xE0" + + 2 {\\Y[Aa][ \0x09-\0x0d]*} 0 "\0xF1" + 2 {Y[Aa]} 0 "\0xF1" + + 2 {\\y[Uu][ \0x09-\0x0d]*} 0 "\0xC0" + 2 {y[Uu]} 0 "\0xC0" + + 2 {\\y[Aa][ \0x09-\0x0d]*} 0 "\0xD1" + 2 {y[Aa]} 0 "\0xD1" + + 2 {\\"[ \0x09-\0x0D]*e} 0 "\0xA3" # small \"e (yo) + 2 "\\0o42{e}" 0 "\0xA3" + 2 {\\y[Oo][ \0x09-\0x0D]*} 0 "\0xA3" + + 2 {\\"[ \0x09-\0x0D]*E} 0 "\0xB3" # capital \"E (Yo) + 2 "\\0o42{E}" 0 "\0xB3" + 2 {\\Y[Oo][ \0x09-\0x0D]*} 0 "\0xB3" + + 2 {\\cydot[ \0x09-\0x0d]*} 0 "" #\cydot out + + 2 "H" 0 "\0xE8" + 2 "h" 0 "\0xC8" + 2 "W" 0 "\0xFD" + 2 "w" 0 "\0xDD" + 2 "X" 0 "\0xFB" + 2 "x" 0 "\0xDB" + + 2 "A" 0 "\0xE1" + 2 "B" 0 "\0xE2" + 2 "V" 0 "\0xF7" + 2 "G" 0 "\0xE7" + 2 "D" 0 "\0xE4" + 2 "E" 0 "\0xE5" + 2 "Z" 0 "\0xFA" + 2 "I" 0 "\0xE9" + 2 "K" 0 "\0xEB" + 2 "L" 0 "\0xEC" + 2 "M" 0 "\0xED" + 2 "N" 0 "\0xEE" + 2 "O" 0 "\0xEF" + 2 "P" 0 "\0xF0" + 2 "R" 0 "\0xF2" + 2 "S" 0 "\0xF3" + 2 "T" 0 "\0xF4" + 2 "U" 0 "\0xF5" + 2 "F" 0 "\0xE6" + 2 "C" 0 "\0xE3" + 2 "Y" 0 "\0xF9" + 2 "a" 0 "\0xC1" + 2 "b" 0 "\0xC2" + 2 "v" 0 "\0xD7" + 2 "g" 0 "\0xC7" + 2 "d" 0 "\0xC4" + 2 "e" 0 "\0xC5" + 2 "z" 0 "\0xDA" + 2 "i" 0 "\0xC9" + 2 "k" 0 "\0xCB" + 2 "l" 0 "\0xCC" + 2 "m" 0 "\0xCD" + 2 "n" 0 "\0xCE" + 2 "o" 0 "\0xCF" + 2 "p" 0 "\0xD0" + 2 "r" 0 "\0xD2" + 2 "s" 0 "\0xD3" + 2 "t" 0 "\0xD4" + 2 "u" 0 "\0xD5" + 2 "f" 0 "\0xC6" + 2 "c" 0 "\0xC3" + 2 "y" 0 "\0xD9" + +# Trash {} + 0 "{" 0 "" diff --git a/support/translit/translit-sun4 b/support/translit/translit-sun4 Binary files differnew file mode 100644 index 0000000000..9b47569a4d --- /dev/null +++ b/support/translit/translit-sun4 diff --git a/support/translit/translit.1 b/support/translit/translit.1 new file mode 100644 index 0000000000..1d76220154 --- /dev/null +++ b/support/translit/translit.1 @@ -0,0 +1,1466 @@ +.TH TRANSLIT JKL "22-Jan-1997" JKL "Version 1.03" +.DA 22 Jan 1997 +.SH NAME +.IP \fITRANSLIT\fR +Program to transliterate texts in different character sets. The program +converts input character codes (or sequences of codes) to a different set +of output character codes (or sequences of codes). Intended for +transliteration to/from phonetic representation of foreign letters with +Latin letters from/to special national codes used for these letters. +It supports simple matches, character lists and flexible matches via +regular expressions. The new transliteration schemes are easily added +by creating simple transliteration tables. Multiple character sets +are supported for input and output. It does not yet support UNICODE, +but some day it will. + +.SH COPYRIGHT +Copyright (c) 1993 Jan Labanowski and JKL Enterprises, Inc. +.br +You may distribute the Software only as a complete set of files. +You may distribute the modified Software only if you retain the +Copyright notice and you do not delete original code, data, documentation +and associated files. +The Software is copyrighted. You may not sell the software or incorporate +it in the commercial product without written permission from +Jan Labanowski or JKL Enterprises, Inc. You are allowed to charge for media +and copying if you distribute the whole unaltered package. + +.SH SYNOPSIS +.B translit +[ +.B -i +.I inpfile +][ +.B -o +.I outfile +][ +.B -d +][ +.B -t +.I transtbl \|\||\|\| transtbl +] +.br + +.SH OPTIONS +.IP "\fB-i\fP \fIinpfile\fP" +.I inpfile +is a name of input file to be transliterated. +If "\fB-i\fP" is not specified, the input is taken from +standard input. +.IP "\fB-o\fP \fIoutfile\fP" +.I outfile +is an output file, where the transliterated +text is stored. If "\fB-o\fP" is not specified, the output is +directed to the standard output. Program will not overwrite the existing +file. If file exists, you need to delete it first. +.IP "\fB-d\fP" +Some information on character codes read from transliteration table file +are sent to standard error ("\fIstderr\fP"). Useful when developing +new transliteration tables. +.IP "\fB-t\fP \fItranstbl\fP" +.I transtbl +is a transliteration table file which you want to use. The "\fB-t\fP" +option may be omitted if the \fItranstbl\fR +is specified as the last parameter on the +command line. The program first tries to locate \fItranstbl\fR +file in the current directory, and if not found, it +searches the directory chosen at compilation/installation time in +"\fIpaths.h\fP". If no "\fItranstbl\fP" is given, the default file name +specified in "\fIpaths.h\fP" is taken. The compile/installation +time defaults in +"\fIpaths.h\fR" for the search directory and the default +file name can be overiden +by setting environment variables: TRANSP and TRANSF, respectively (see below). + +.SH ENVIRONMENT VARIABLES +The default path to the directory holding transliteration tables can +be overiden by setting environment variable TRANSP. The default name +for the transliteration table can be overiden by setting TRANSF environment +variable. However, when the transliteration file is given on the command line, +it will overide the defaults and environment setting. +Here are some examples of setting environment +variables for different operating systems: +.sp +.in +2m +.br +\fIUN*X System\fR +.br +.nf + If you are using \fIcsh\fR (C-shell): + setenv TRANSP /home/john/translit/ + setenv TRANSF koi8-tex.rus + If you are using \fIsh\fR (Bourne Shell): + set TRANSP=/home/john/translit/ + export TRANSP + set TRANSF=koi8-tex.rus + export TRANSF +\fIVAX-VMS System\fR + TRANSP:==SYS$USER:[JOHN.TRANSLIT] + TRANSF:==KOI8-TEX.TBL +\fIPC-DOS or MS-DOS\fR + SET TRANSP=C:\|\\\|JOHN\|\\\|TRANSLIT\|\\ + SET TRANSF=KOI8-TEX.TBL +.fi +.in -2m +Note that the directory path has to include concluding +slashes, \|\\\| or \|/\|\|. + + +.SH EXAMPLES +.ta 5m +.br + cat text.koi8 \|\||\|\| translit koi8-tex.rus > text.tex +.br +in UN*X is equivalent to: +.sp 1 + translit -t koi8-tex.rus -o text.tex -i text.koi8 +.br +and converts file text.koi8 to file text.tex using transliteration +specified in the file koi8-tex.rus. +.sp 1 + translit -i text.koi8 koi8-cl.rus +.br +displays the converted text from file text.koi8 on your terminal. The +conversion table is koi8-cl.rus (KOI8 --> Library of Congress). +.sp 1 + translit -i text.alt -t alt-koi8.rus \|\||\|\| translit -o text.tex -t koi8-tex.rus +.br +is essentially equivalent to the following two commands in UN*X or MS-DOS: +.br + translit -i text.alt -o junkfile -t alt-koi8.rus +.br + translit -i junkfile -o text.tex -t koi8-ltx.rus +.br +and converts the file in ALT character set to a LaTeX file for printing. +.sp + translit -i russ.txt pho-koi8.rus \|\||\|\| translit -o russ.tex koi8-ltx.rus +.br +converts file russ.txt from phonetic transliteration to LaTeX file russ.tex +for printing. +.sp 2 + +.SH TRANSLITERATION TABLES +The following transliteration files are available with the current +distribution. Consult the comments in the individual files for details. +.IP \fIkoi8-tex.rus\fP +Conversion table which changes the file in KOI8 (8 bit character set +used by RELCOM news service) to a Plain TeX file for printing with +\fIAMS\fR WNCYR fonts. +.IP \fIkoi8-ltx.rus\fP +Conversion table which changes the file in KOI8 (8 bit character set +used by RELCOM news service) to LaTeX file for printing with +\fIAMS\fR WNCYR fonts. +.IP \fIltx-koi8.rus\fP +Conversion table for the LaTeX to KOI8 conversion. Note that it will not +handle complicated cases, since LaTeX is a program, and only TeX can +convert a LaTeX source to the characters. However, it should work OK +for simple cases of text only files, and may need some editing for +complicated cases. +.IP \fIk8-tavtt.rus\fP +Converts KOI8 to Bill Tavolga cyrttf truetype font mapping. +.IP \fIhex-text.rus\fP +Converts hexcodes to actual codes. Some e-mail programs convert characters +with codes larger than 127 to hexadecimal numbers like =AB, =9C, etc. +This table converts hexadecimal numbers back to codes. +.IP \fIalt-gos.rus\fP +This is a transliteration data file for converting from ALT (Bryabrins +alternativnyj variant used in many popular wordprocessors) +to GOSTSCII 84 (approx. ISO-8859-5?) +.IP \fIalt-koi8.rus\fP +This is a transliteration data file for converting from ALT to KOI8. +KOI8 is meant to be GOST 19768-74 (as used by RELCOM). +.IP \fIgos-alt.rus\fP +This is a transliteration data file for converting GOSTSCII 84 +(approx. ISO-8859-5?) to ALT (Bryabrins alternativnyj variant) +.IP \fIgos-koi8.rus\fP +This is a transliteration data file for converting GOSTSCII 84 +(approx. ISO-8859-5?) to KOI8 used by RELCOM +KOI8 is meant to be GOST 19768-74 +.IP \fIkoi8-alt.rus\fP +This is a transliteration data file for converting from KOI8. +KOI8 is meant to be GOST 19768-74, to ALT (Bryabrins alternativnyj variant) +.IP \fIkoi8-gos.rus\fP +This is a transliteration data file for converting from KOI8 (Relcom). +KOI8 is meant to be GOST 19768-74, to GOSTSCII 84 (approx. ISO-8859-5) +.IP \fIkoi8-7.rus\fP +This file converts from KOI8 to KOI7. +.IP \fIkoi7-8.rus\fP +This file converts from KOI7 to KOI8. Before you attempt the conversion, +you might need to perform a simple edit on your file. You MUST read the +comments in \fIkoi7-8.rus\fR before you attempt this conversion. +.IP \fIkoi7nl-8.rus\fP +This file assumes that there are only Russian letters (no Latin) +in the input file. If you have Latin letters, and you inserted SHIFT-OUT/IN +characters, use file \fIkoi7-8.rus\fP. +.IP \fIkoi8-lc.rus\fP +This file converts KOI8 to the Library of Congress transliteration. +Some extensions are added. +.IP \fIkoi8-php.rus\fP +This file converts KOI8 to the Pokrovsky transliteration. +.IP \fIphp-koi8.rus\fP +This file converts from Pokrovsky transliteration to KOI8. +.IP \fIkoi8-phg.rus\fP +This file converts from KOI8 to GOST transliteration. +.IP \fIphg-koi8.rus\fP +This file converts from GOST transliteration to KOI8. +.IP \fIpho-koi8.rus\fP +This is a table which will convert from many "phonetic" transliteration +schemes to KOI8. It is elaborate and it takes a lot of time to +transliterate the file using this table. Some transliterations are +hopeless and internally inconsistent (as humans...), so the results +cannot be bug free. +You might want to modify the file, if your transliteration +patterns are different than those assumed in this file. You may also want +to simplify this file if the phonetic transliteration you are converting +is a sound one (most are not, e.g., they use e for je and e oborotnoye, +ts for c and t-s, h for kha, i for i-kratkoe, etc.). +.sp + +.SH INTRODUCTION +If you do not intend to write your own transliteration tables, you may +skip this description and go directly to the installation and +copyright sections. However, you might want to read this material anyhow, +to better understand the traps and complexities of transliteration. +It is frequently necessary to transliterate text, i.e., to change one set +of characters (or composite characters, phonemes, etc.) to another set. +.PP +On computers, the transliteration operation consists of converting the input +file in some character set to the output file in another character set. +.PP +In the simplest case, the single characters are transliterated, i.e, their +codes are changed according to some transliteration table. This is called +remapping and, assuming the one-to-one mapping, the task can be accomplished +by a simple pseudo program: +.br + new_char_code = character_map[old_char_code]; +.PP +If the one-to-one correspondence does not exist (i.e., some codes may +be present in one set, but do not have corresponding codes in another set), +precise transliteration is not possible. In such cases there are 3 obvious +possibilities: +.br + 1. skip characters which do not have counterparts, +.br + 2. retain unchanged codes of these characters, +.br + 3. convert the codes to multicharacter sequences. +.br +In some cases, the file can contain more than one character sets, e.g., +the file can contain Latin characters (e.g. English text) and Cyrillic +characters (e.g. Russian text). If the character codes assigned to +characters in different sets do not overlap, this is still a simple mapping +problem. This is a case with KOI8 or GOSTCII character tables for Russian, +which reserve the lower 127 codes for standard ASCII codes (which include +all Latin characters) and characters with codes above 127 for Cyrillic letters. +.PP +If character codes overlap, there is a SHIFT-OUT/SHIFT-IN technique in +which the meaning of the character sequence is determined by an opening +code (or sequence of characters codes). In this case, the meaning of the +series of characters is determined by the SHIFT-OUT character (or sequence) +which precedes them. The SHIFT-IN character (or sequence) following the +series of characters returns the "reader" to the default or previous status. +To schemes are used: +.br + (char_set_1)(SHIFT-IN[1])(SHIFT-OUT[2])(char_set_2)... +.br +or +.br + (char_set_1)(SHIFT-OUT[2])(char_set_2)(SHIFT-OUT[1])char_set_1... +.br +.sp 1 +Since computer keyboards, screens, printers, software, etc., are by necessity +language specific (the most popular being ASCII), there is a problem of typing +foreign language text which contains letters different than standard Latin +alphabet. For this reason, many transliteration schemes use several Latin +letters to represent a single letter of foreign alphabet, for example: +.br +zh is used to represent cyrillic letter zhe, \|\\\|"o may be used to +represent the o umlaut, etc. + +If there is one-to-one mapping of such sequences to another alphabet, it +is also easy to process. However, it is necessary to substitute longest +sequences first. For example, a frequently used transliteration +for cyrillic letters: +.br +.ta 2mL 7mL 11mL 24mL + \fIshch\fR --- letter \fBshcza\fR 221 (decimal KOI8 code) +.br + \fIsh\fR --- letter \fBsha\fR 219 +.br + \fIch\fR --- letter \fBcze\fR 222 +.br + \fIc\fR --- letter \fBtse\fR 195 +.br + \fIh\fR --- letter \fBkha\fR 200 +.br + \fIa\fR --- letter \fBa\fR 193 +.PP +Obviously, in this case, we should proceed first with converting all \fIshch\fR +sequences to \fBshcha\fR letter, then two-character \fIsh\fR +and \fIch\fR, and then single +character \fBc\fR and \fBh\fR. +Generally, for the one-to-one transliteration, the longest +sequences should be precessed first, and the order of conversion within +sequences of the same length makes no difference. +For example, converting the word "shchah" to KOI8 should proceed in a following +way: +.br + \fIshchah\fR --> (221)\fIah\fR, (221)\fIah\fR --> (221)(193)\fIh\fR, (221)(193)\fIh\fR --> (221)(193)(200) +.br +There is a multitude of reasons why transliteration is done. I wrote this +program having in mind the following ones: +.br + 1) to print cyrillic text using TeX/LaTeX and cyrillic fonts +.br + 2) to read KOI8 encoded messages from Russia on my ASCII terminal. +.br +However, I was trying to make it flexible to accommodate other uses. + +.SH PROGRAM OPERATION +The program converts the input file to an output file using +transliteration rules from the transliteration rule file which +you specify with option \fB-t\fR. +Some examples of transliteration rule files are enclosed. +Before program can be used, the transliteration rules need to be specified. +.PP +These are given as a file which consist of the following parts +described below: +.br +.in +2m +.in +5m +.ti -5m +1) File format number (it is 1 at this moment) +.ti -5m +2) Delimiters used to enclose a) simple strings, b) character lists, +c) regular expressions +.ti -5m +3) Starting sequence for output +.ti -5m +4) Ending sequence for output +.ti -5m +5) Number of input "character sets" +.ti -5m +6) SHIFT-OUT/SHIFT-IN sequences for each input character set +.ti -5m +7) Number of output "character sets" +.ti -5m +8) SHIFT-OUT/SHIFT-IN sequences for each output character set +.ti -5m +9) Transliteration table +.in -5m +.in -2m +.PP +\fIGENERAL COMMENTS\fR +.br +The transliteration rules file consists of comments and data. +The comments may be included in the file as: +.in +5m +.ti -2m +a) line comments --- lines starting with ! or # character (# or ! must be +in the first column of a line) are treated as comments and are not +read in by the program. +.ti -2m +b) comments following all required entries on the line. They must be +separated by at least one space from the last data entry on the line +and need not start with any particular character. These comments cannot +be used within multiline sequences. +.br +.in -5m +.PP +The data entries consist of integer numbers and strings. +The strings may represent: +.br + a) plain strings +.br + b) character lists +.br + c) regular expressions +.br +.PP +All strings which appear in the file, are processed through the +"string processor", which allows entering unprintable characters as codes. +The character code is specified as a backslash "\|\\\|" followed by at least +2 digit(s) (i.e., \|\\\|01 produces code=1, but \|\|\\\|1 is passed unchanged). The +following formats are supported: +.br + \|\\\|0123 character of octal code 123 (when leading zero present) +.br + \|\\\|123 character of decimal code 123 (when leading digit is not zero) +.br + \|\\\|0o123 or \|\\\|0O123 character of octal code 123 +.br + \|\\\|0d123 or \|\\\|0D123 character of decimal code 123 +.br + \|\\\|0xA3 or \|\\\|0XA3 or \|\\\|0xa3 character of hexadecimal code A3 +.br +.PP +The allowed digits are 0-7 for octal codes, 0-9 for decimal codes and +0-F (and/or 0-f) for hexadecimal codes. +In a situation when code has to be followed by a digit character, +you need to enter the +digit as a code. E.g., if you want character \|\\\|0xA3 followed by a letter C, +you need to specify letter C as a code (\|\\\|0x43 or \|\\\|103 or \|\\\|0o103 or \|\\\|0d67) +and type the sequence as, e.g., \|\\\|0xA3\|\\\|103. +Character resulting in a code 0 (zero) (e.g., \|\\\|00) is special. It tells: +"skip everything what follows me in this string". +It does not make sense to use it, since you can always terminate the +sequence with a delimiter. When you use an empty string as a matching +sequence, remember that it does not match anything. +.sp +If the line with entries is too long, you can break it between the +fields. +If the string is too long to fit a line, you can break it before any nonblank +character by the \|\\\| (backslash) followed by white space (i.e., new lines, +spaces, tabs, etc.). The \|\\\| and the following white space will be removed +from the string by the string preprocessor. However, you are not allowed +to break the individual character codes (and you probably would not +do it ever for aestetic purposes). +For example: +.br + "experi\\ +.br + mental design" +.br +is equivalent to: +.br + "experimental design" +.br +while: +.br + "experimental\\ +.br + design" +.br +is equivalent to: +.br + "experimentaldesign" +.br +If you need to have \|\\\| followed by a space in your string, you need to +enter either a backslash or a space following it as an explicit character +code, for example: +.br + "\|\\\|\|\\\|0o40" +.br +will produce a \|\\\| followed by the space, while the string: +.br + "\|\\\| " +.br +will be empty. +.sp 1 +The preprocessor knows only about comments, plain characters, character codes, +and continuation lines. However, some characters and their combinations +may have a special meaning in lists and regular expressions. +.sp 2 +\fIDETAILS OF FILE STRUCTURE\fR +.sp +.PP +.in +3m +.ti -3m +Ad.1) File format number. This is simply a digit 1 on a line by itself at the +moment. This entry is included to allow future extensions of the +transliteration description file without the need to modify older +transliteration descriptions (program will read data according to +the current file format number given in the file). +.sp +.ti -3m +Ad.2) String delimiters. The subsequent 3 lines specify pairs of +single character delimiters for 3 types of text data. +The line format is: +.br + opening_character closing_character. +.br +These are needed to mark the beginning/end and the type of the text data. +Each string (text datum) is saved starting from the first character after +opening delimiter, and ends at the last character before the closing +delimiter. If you need to use the closing delimiter within a string, +you need to specify it as its code (e.g., if you are using () pair as +delimiters, specify ")" as \|\\\|0x29). The opening delimiter may be the same +or different from the closing delimiter. +.sp +.in +2m +.ti -2m +a) The first line contains characters used to enclose (bracket) +a \fIplain string\fR. Plain strings are directly matched to input data or +directly sent to output. +I suggest to stick to " " pair for plain strings. +The ASCII code for " is \|\\\|0d34 = \|\\\|0x22 = \|\\\|0o42 if you need it inside the +string itself. +.sp +.ti -2m +b) The second line contains characters to mark the beginning and the end +of the \fIlist\fR. Lists are used to translate single character codes. +I suggest [ and ] delimiters for the list (ASCII code of "]" is: +\|\\\|0d93 = \|\\\|0x5D = \|\\\|0o135). The lists may include ranges, for example: +[a-zA-Z0-9] will include all Latin letters (small and capital) and digits. +Note that order is important: [a-d] is equivalent to [abcd], while +[d-a] will result in an error. If you want to include "-" (minus) in the +list, you need to place it as the first or the last character. There are only +two special characters on the list, the "-" described above, and the "]" +character. You need to enter the "]" as its code. E.g., for +ASCII character table [*--] is equivalent to [*+,-], is equivalent to +[\|\\\|42\|\\\|43\|\\\|44\|\\\|45]. The order of characters in the list does not matter +unless the input list corresponds to the output list (this will be +explained later). Empty lists do not make sense. +.sp +.ti -2m +c) The third line of delimiter specification contains delimiters for +\fIregular expression\fRs and \fIsubstitution expression\fRs. +These strings are used for "flexible" matches +to the text in the input file. They are very similar to the ones used in +UN*X for searching text in utilities like: grep, sed, vi, awk, etc., though +only a subset of full UN*X regular expression syntax is used here. +I suggest enclosing them within braces { and } (ASCII code for } is +\|\\\|0d125 = \|\\\|0x7D = \|\\\|0o175). Actually, regular expressions can only +be used for input sequences, and for output sequences the {} are +used to enclose substitution sequences. This will be explained +below. The description of the +syntax for regular/substitution expressions is +adapted from the documentation for the regexp package of Henry +Spencer, University of Toronto --- this regular expression package +was incorporated, after minute modifications, into the program. +.br +.sp 2 +.ce +\fBREGULAR EXPRESSION SYNTAX\fR +.br +A regular expression is zero or more branches, separated by +`\|\||\|\|'. It matches anything that matches one of the branches. +The `\|\||\|\|' simply means "or". +.ti +2m +A branch is zero or more pieces, concatenated. It matches a +match for the first, followed by a match for the second, +etc. +.ti +2m +A piece is an atom possibly followed by `*', `+', or `?'. +An atom followed by `*' matches a sequence of 0 or more +matches of the atom. An atom followed by `+' matches a +sequence of 1 or more matches of the atom. An atom followed +by `?' matches zero or one occurrences of atom. +.ti +2m +An atom is a regular expression in parentheses (matching a +match for the regular expression), a range (see below), `.' +(matching any single character), a `\|\\\|' followed by +a single character (matching that character), or a +single character with no other significance (matching that +character). +.ti +2m +A range is a sequence of characters enclosed in `[\|\|]'. It +normally matches any single character from the sequence. If +the sequence begins with `^', it matches any single character +not from the rest of the sequence. If two characters in +the sequence are separated by `-', this is shorthand for the +full list of ASCII characters between them (e.g. `[0-9]' +matches any decimal digit). To include a literal `]' in the +sequence, make it the first character (following a possible +`^'). To include a literal `-', make it the first or last +character. The regular expression can contains subexpressions +which are enclosed in a (\|\|) pair. These subexpressions are numbered +1 to 9 and can be nested. The numbering of subexpressions is +given in the order of their opening parentheses "(". For +example: +.br +.ta 6mL + (111)...(22(333)222(444)222)...(555) +.br +Note that expression 2 contains within itself expressions 3 and 4. +.br +These subexpressions can be referenced in the substitution string which +is described below in the paragraph below, or can be used to delimit +atoms. +.in +2m +Examples: +.in +2m +.ti -2m +{[\|\\\|0d32\|\\\|0d09]\|\\\|0d10} --- will match space or tab followed by new line +.ti -2m +{[Tt][Ss]} --- will match TS, Ts, tS and ts +.ti -2m +{TS\|\||\|\|Ts\|\||\|\|tS\|\||\|\|ts} --- same as above +.ti -2m +{[\|\\\|0d09-\|\\\|0d15 ][^hH][^uU][a-zA-Z]*[\|\\\|0d09-\|\\\|0d15 ]} --- all words which +do not start with hu, Hu, hU, HU. There is a space between +\|\\\|0d15 and ]. +.br +Note that specifying expressions like {.*} (i.e., match all characters) +does not make much sense, since it would mean here: match the whole input +file. However, expressions like {A.*B} should be acceptable, since they +match a pair of A and B, and everything in between them, e.g. for a +string like: "This is Mr. Allen and this is Mr. Brown." this expression +should match the string: "Allen and this is Mr. B". +.br +.in -4m +Remember to put a backslash "\|\\\|" in front of the following +characters: .\|\|[\|\|(\|\|)\|\||\|\|?\|\|+\|\|*\|\|\|\\\| if you want +their literal meaning outside the +range enclosed in [\|\|]. Inside the range they have their literal meaning. +If you know the syntax of UN*X regular expressions, please note that +\|\|^\|\| and \|$\| anchors are not supported and are treated as normal +characters (with the exception of \|\|^\|\| negation within [\|\|]). +.sp +.ce +\fBSUBSTITUTION EXPRESSIONS\fR +.br +After finding a match for a regular expression in the input text, +a substitution is made. +It can be a simple substitution where the whole matching string +is replaced by another string, or it may reuse a portion or +the whole matching string. The subexpressions (the ones enclosed +in parentheses) within the regular +expression which matched the input text can be referenced in the +substitution expression. +Only the following characters have special meaning within substitution +expression: +.in +4m +.ta 3m +.br +.ti -2m +& --- will put the whole matching string. +.ti -2m +\|\\\|1 --- will put the match for the 1st subexpression in (\|\|). +.ti -2m +\|\\\|2 --- will put the string which matched 2nd subexpression, +etc. +.ti -2m +\|\\\|9 --- will place in a replacement string the 9th +subexpression (provided that there was 9 (\|\|) pairs in +the regular expression) +.in -4m +.sp +Only 9 subexpressions are allowed. +All other characters and sequences within the substitution expression +will be placed in a substitution string as written. To be able to put +a single backslash there, you need to put two of them. +To be able to place the unchanged codes of the +above characters (i.e., to make them literals), you need to precede them +with a backslash "\|\\\|", i.e., to get & in the output string +you need to write it as \|\\\|&. Similarly, to place literal +\|\\\|1, \|\\\|2, etc., you need to enter it as \|\\\|\|\\\|1, \|\\\|\|\\\|2, etc. +Note that characters .+[]()^, etc. which had a special meaning in +the regular expressions, do not have any special meaning in the +substitution expression and will be output as written. +.in +2m +Example: +.br +The regular expression: +.in +2m +.ti -2m +{([Tt])([Ss])} and the corresponding substitution expression {\|\\\|1.\|\\\|2} +puts a period +between adjoining letters t and s preserving their letter case. +.br +The expression: +.ti -2m +{([A-Za-z]+)-[ \|\\\|0x09]*([\|\\\|0x0A-\|\\\|0x0D]+)[ \|\\\|0x09]*([A-Za-z,.?;:"\|\\\|)'`!]+)[ \|\\\|0x09]} +.br +and the substitution expression {\|\\\|1\|\\\|3\|\\\|2} dehyphenate words (when you +understand this one, you are a guru...). For example: +con- (NL)cert is changed to concert(NL), where NL stands for New +Line. It looks for one or more letters (saves them as substring 1) +followed by a hyphen (which may be followed by zero or more spaces +or tabs). The hyphen must be followed by a NewLine (ASCII characters +0A-0D hex form various new line sequences) and saves NewLine sequence +as a subexpression 2. +Then it looks for zero or more tabs and spaces (at the beginning of +the line). Then it looks for the rest of the hyphenated word and +saves it as substring 3. The word may have punctuation attached. +Then it looks again for some spaces or tabs. The substitution expression +junks all sequences which were not within (), i.e., hyphen and +spaces/tabs and inserts only substrings but in a different +order. The \|\\\|1 (word beginning) is followed by \|\\\|3 (word end) and +followed by the NewLine --- \|\\\|2. The {\|\\\|2\|\\\|1\|\\\|3} would +be probably equally good, though you would need to move the punctuation +matching to the beginning of the regular expression. +.in -6m +.ti -3m +Ad.3) Starting sequence. This sequence will be sent to the output before +any text. It is enclosed in the pair of string delimiters. I use it +to output LaTeX preamble. However, it can be empty, if not used. +The (sequence) may contain any characters, including new lines, etc. +.nf +.ta 2m 4m + Example: + "" # empty sequence +.sp + Example: + "\|\\\|documentstyle{article} + \|\\\|input cyracc + \|\\\|begin{document} + " + is right (note a new line at the end), but +.br + "\|\\\|documentstyle{article} + \|\\\|input cyracc # this comment will be included! + \|\\\|begin{document}" # while this will not + is wrong. +.sp +.fi +.ti -3m +Ad.4) Ending sequence. Similar to 1), but will be appended at the end of the +output file. +.nf + For example: + "\|\\\|end{document} + " +.fi +.sp +.ti -3m +Ad.5) Number of input character sets. For example, in some incarnation of +KOI7, there are two character sets: Latin and Cyrillic. Cyrillic +character sequence follows SHIFT-OUT character (CTRL-N), \|\\\|0x0e, +and is terminated by SHIFT-IN character (CTRL-O), \|\\\|0x0f. +Another way of looking at it is that Latin characters follow +CTRL-O and cyrillic ones follow CTRL-N. +.sp +If there is only one character set on input you should specify 0 +as a number of input char sets, +since the input file obviously does not contain any SHIFT-OUT/IN +sequences. +.sp +.ti -3m +Ad.6) SHIFT-OUT/SHIFT-IN sequences for each input character set. +These lines appear only if you specified nonzero number of character sets. +These lines contain also "nesting sequences", which will be +explained later in this section. +You do not use "nesting sequences" frequently, and let us assume +for a moment that nesting data are empty strings. +The strings or regular expressions specified here are matched +with the contents of input text. If match was found, the matching sequence +is usually deleted from the input text and: +.in +4m +.ti -2m +a) for SHIFT-OUT sequence: the current input character set number is changed +to the new one corresponding to the SHIFT-OUT sequence, or +.ti -2m +b) for SHIFT-IN sequence: the previous input character set number is restored, +(i.e., the one which preceded the SHIFT-OUT sequence for the current set). +Note that only the SHIFT-IN sequence for the current set is matched. +The SHIFT-IN sequences for other character sets than the current set are +not matched. +The bracketing of sets is assumed +perfect. If the SHIFT-IN sequence for the current set is an empty string, +the input set number is changed when SHIFT-OUT sequence of the new set +is detected. +.in -4m +For each input character set, you have to specify a line consisting +of 6 strings/expressions separated by spaces: +.br + SO-match SO-subs NEST-up NEST-down SI-match SI-subs +.br +where: +.br +.in +2m +.ti -2m +SO-match --- the string or regular expression for the SHIFT-OUT sequence +for the current character set. If detected, the input character set is +changed to this set. +.ti -2m +SO-subs --- this is usually an empty string (i.e., the input sequence +matching SO-match is removed). But it can be a replacement string or +a substitution expression, which will substitute the original matching +SHIFT-OUT sequence. +.ti -2m +NEST-up --- this string (or a regular expression) is usually an empty +string). However, it can be used to count brackets for detection of SHIFT-IN +bracket, if SHIFT-IN sequence is not unique. Its use is explained below. +.ti -2m +NEST-down --- a counterpart of NEST-up. It is explained later. +.ti -2m +SI-match --- when a sequence in an input file matches the string or regular +expression given as SI-match for a current input character set, the +input character set number is restored to the previous set. Note, that +only SI-match for a current set is matched with input characters. +.ti -2m +SI-subs --- this is usually an empty string (i.e., input sequence which +matched SI-match is removed), but if it is not, the input characters which +matched the SI-match are replaced with the SI-subs. +.sp +.in -2m +.br +The KOI7 case described above may be specified as: +.nf +.ta 5m 10m 15m 20m 25m +.nf + 2 # 2 input sets + ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 # Latin(set 1) + "\|\\\|016" ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 "\|\\\|017" ""\0\0\0\0 # Cyrillic(set 2) + or + 2 # 2 sets + "\|\\\|017" ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 # Latin(set 1) + "\|\\\|016" ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 # Cyrillic(set 2) +.fi +.br +Before the input is processed, the program is initialized to the character +set of the first set. In the above case, it is important, since declaration: +.nf + 2 # 2 sets + "\|\\\|016" ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 # Cyrillic(set 1) + "\|\\\|017" ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 ""\0\0\0\0 # Latin(set 2) +.br +.fi +would be wrong and would mess up the Latin characters preceding +first Cyrillic sequence. +.sp 1 +The nesting sequences are used only for specific situations. I needed them +to write a transliteration table from LaTeX to KOI8. +In LaTeX the { } pair is used for grouping and appears frequently in +the text. The sequence of cyrillic characters is also a group +in LaTeX. +The SHIFT-OUT sequence for Russian letters in LaTeX is (at least in +my case): "{\|\\\|cyr ", and the end +of the Russian letters is marked by "}", but the "}" has to be the +bracket matching the opening "{" in "{\|\\\|cyr ", not just any bracket. +For this reason, my SHIFT-OUT/IN entry was in this case: +.br + "{\|\\\|cyr " "" "{" "}" "}" "" # Cyrillic codes +.br +Whenever the "{\|\\\|cyr " was found, the program zeroes the counter. +It adds +1 to it, when NEST-up sequence (i.e., the "{" here) is found, and +subtracts 1 from it, when the NEST-down sequence is found (i.e., the "}"). +The checking for a SHIFT-IN sequence (i.e., the "}") for cyrillic set +is done only when +the counter value is zero (i.e., all pairs inside the cyrillic text are +matched. In fact, the process is more +complicated than that (the counter for an opened character set is +placed on the stack), but these are details you can find in the code +itself. +.br +What if the SHIFT-IN and SHIFT-OUT sequence is the same character? +Starting from version 1.01 the TRANSLIT will also work in such cases. +Let us assume that the SHIFT-IN and SHIFT-OUT sequence is a single +character "%" which switches between two character sets. Also, +if we want to use it in the text, we have to double it, +i.e., "%%" will not be a SHIFT-IN/OUT sequence but will denote a literal +percent sign. We can do it in the following way: +.br + "" "" "" "" "" "" # Latin letters +.br + {%([^%])} {\|\|\\\|\|1} "" "" {%([^%])} {\|\|\\\|\|1} # Cyrillic codes +.br +and later in the transliteration table (see below) we should put a line: +.br + 0 "%%" 0 "%" # change doubled % to a single one +.br +The same effect, for identical SHIFT-IN/OUT sequences, can be accomplished +with a -3 character set code and will be described below. +.sp +.ti -3m +Ad.7) Number of output "character sets". This is analogous to the input case. +The characters sent to output may belong to different sets. For example, +when the character (or the sequence) from set 2 is followed by the character +(or the sequence) from set 1, +the program first sends the SHIFT-IN sequence for set 2 (if it is not +empty) and then the SHIFT-OUT sequence for set 1 (if it is not empty). If the +output character (or sequence) is assigned to set 0, then no SHIFT-IN/SHIFT-OUT +sequences are sent to output. +.br +If there is only one set of output characters, you should specify 0. +Note that you may have several input sets and several output sets, though +this is rare. Usually, you have one input set and many +output character sets, or vice versa. Again, if you have only one output set, +you do not have any SHIFT-IN/SHIFT-OUT sequences, since those are +send to output only when a set number is changed. +But you are free to experiment. +.sp +.ti -3m +Ad.8) SHIFT-OUT/SHIFT-IN sequences for each output character set. It is +similar to the input case, however, the NEST-in and NEST-up sequences +are not used here. Again, before any text is sent to output, the +character set specified as the first one is assumed. If SHIFT-OUT/IN +sequences are not used (i.e., you have only one output character set), +you will not have any SHIFT-OUT/SHIFT-IN data lines. +The KOI8 (single character set containing all Latin and Russian letters) +to KOI7 (the set using overlapping codes switched by SHIFT-OUT/IN sequences) +conversion could be therefore accomplished by the following table: +.br + 2 # 2 output sets +.br + ""\0\0\0\0 ""\0\0\0\0 # Latin Letters +.br + "\|\\\|016" "\|\\\|017" # Russian Letters +case +.sp +.ti -3m +Ad.9) Transliteration table for individual character or their sequences. +It is a core of your transliteration data. +There are 4 columns in the transliteration +table: +.br +.in +3m +(inp_set_no) (inp_seq) (out_set_no) (out_seq) +.br +.in -3m +These 4 columns are separated by spaces. The (input_set_number) +corresponds to the input character set number as specified above for +input SHIFT-OUT/SHIFT-IN data, or zero. +If zero is used (even if number of input sets is not zero), the +(input_sequence) will be always matched, irrespectively of the current +input character set imposed by the SHIFT-OUT sequence. This is useful, +since some characters are universal (e.g., new lines, spaces, pluses, +minuses, etc.) irrespectively of the current character set. +The (input_sequence) is the sequence of characters to be matched with +characters in the input file, and if found (within the character set +specified) it is replaced by the (output_sequence) and sent to output +(i.e., the matching is interrupted, the (output_sequence) sent to ouput, +the input file pointer is moved to the first character after the +matched sequence and matching resumes). +The (output_set_number) specifies the output character set. When the +output character set changes during transliteration, the appropriate SHIFT-IN +sequence of the previous set and the current set's SHIFT-OUT sequence is sent +to output. The (output_set_number) may also be zero (even if number of +output sets is not zero). In this case, the current output set status +is not changed, and no SHIFT-IN/OUT sequences is sent to output. Lastly, the +output set code may be -1, -2 or -3. +In this case, the substitution is performed +within input string that matched but the output sequence is not sent to +the output yet. Depending on the code, the following action is performed: +.in +4m +.ti -2m +-1 --- program makes the substitution in the input string (i.e., substitutes +the matching string with the input string in the input buffer). +It does not send the output sequence to the output, but +continues matching input sequences following the currently +matched one. +.ti -2m +-2 --- like code -1, but matching is resumed from the first sequence on +the list. +.ti -2m +-3 --- like code -1, but matching is resumed from the input SHIFT-OUT/IN +sequences. +.in -4m +E.g., if the unprocessed text in the input file is: +.br + mental procedure was not successful since.......... +.br +and there was a line in transliteration table: +.br + 0 "me" -1 "you" +.br +the input text would be changed to: +.br + yountal procedure was not successful since.......... +.br +and all remaining matching data would be applied to this text, rather than +original text. +The -2 code backsteps to the point where the matching of +transliteration starts. +The -3 code backsteps even further, to the point where the +input SHIFT-OUT and SHIFT-IN sequences are matched. +Since the order of sequences to match +is crucial here, for the case of output set code -1/-2/-3 +even one-character input sequences are matched in the order specified. +BE CAREFUL HERE. You may create infinite loops. If you use +code -2/-3, be sure that the resulting sequence after substitution +with the code -2/-3, will not match previous sequences +with codes -2/-3. +.br +The (output_sequence) +is a sequence which substitutes the corresponding (input_sequence). +If (output_sequence) is "" (i.e., empty string) then (input_sequence) +is effectively deleted. +The (input_sequence)s are compared with input in the order specified +unless backstepping -2/-3 code is used (the matching is done from the +first sequence again). I use the code -1 e.g., +to dehyphenate words when changing to LaTeX. +Code -2 is useful if you want to skip next comparisons, and the resulting +substitution string will match earlier matching expressions. +I do not see many uses for the code -3, but it can be used to resolve +"toggle" SHIFT-IN/OUT sequence, as described in an example further +below. +The order for multicharacter sequences is +therefore important (the single character sequences are always compared +after all multicharacter sequences, and can be therefore put anywhere). +The longer multicharacter sequences should be specified before +shorter ones, unless they are some "preprocessing" steps with codes +-1/-2/-3. The order may sometimes be crucial. +If you need single character sequences matched in a specific order, +enter them as regular expressions, i.e., as {c} instead of "c". +In short, the multicharacter input sequences and regular expressions +are matched to input text in the order specified. For the sake of +efficiency, the single character input sequences (with exception of +output set code -1/-2/-3) and input lists are handled as a case of remapping +and are matched in the order of character codes associated with them. +If you specify the same single input character twice for a given input set, +the program will complain. +The following combinations of input and output sequences are allowed: +.nf +.ta 2m 24m + Input Sequence Output Sequence + "\fIplain string\fR" only "\fIplain string\fR" + [\fIlist\fR] [\fIlist\fR] or "\fIplain string\fR" + {\fIregular expression\fR} {\fIsubstitution expression\fR} or +.br + "\fIplain string\fR" +.br +.fi +When match is found, the matching sequence is removed and substituted +with an output sequence. If this results is changing the current output +character set, the appropriate SHIFT-IN/SHIFT-OUT pair is sent to the +output before the transliterated output sequence. If list is +used as the input sequence, you may either use: +.br +.in +2m +.ti -2m +a) plain string as output +sequence. In this case, if current input character belongs to the input list, +it is replaced by the output string. I use it to delete ranges of +characters which do not have any corresponding characters in the output +set (e.g., some graphics characters). In this case, the order of +characters on the input list is not important. +.ti -2m +b) if the output string is also a +list then it has to contain exactly the same number of characters as +the input list. In this case, the 1st character from the input list +is replaced by the 1st character from the output list, the 2nd one +by the 2nd one, etc. Therefore, the order of characters is important. +.br +.in -2m +Theoretically, if there is one-to-one correspondence between characters +in the input set and characters in the output set, +you can make the conversion by +using a single line consisting of two lists. But it looks ugly... And is +difficult to read. +And for the program, the substitution takes the same time, if +the characters are specified separately, or when they are specified +as matching lists. +If regular expression is used to match the input characters, the matching +sequence may be replaced by a plain string or a substitution string, +which was described above. +.in +3m +Examples: +.br +.ta 3m 10m 20m 30m 40m + 2 "CCCP" 0 ""\0\0\0\0 +.br +will delete all occurrences of CCCP from the input file (but not Cccp or +CCCp) for input set 2. +.sp 1 + 0 "\|\\\|0xD1" 0 "ya" +.br +will replace all occurrences of character of the code \|\\\|0xD1 with a two +letter sequence "ya". +.sp 1 + 0 \|\\\|0xD1 2 q +.br +will replace all characters \|\\\|0xD1 with a character "q" and output +SHIFT-IN/OUT sequence if necessary. +.sp 1 + 2 "q" 0 "\|\\\|0xD1" +.br +will replace letter q (if the current input set is 2) with a code \|\\\|0xD1. +.sp 1 + 0 "\|\\\|0xD1" 2 "ya" +.br +will replace code \|\\\|0xD1 with a sequence ya (assuming that SHIFT-OUT +and SHIFT-IN sequences +for output set 2 are: {\|\\\|cyr and }, respectively, you will get {\|\\\|cyr ya}). +.sp +If a character is not specified in the transliteration table, it will +be output as is, i.e., it corresponds to a line: +.br + 0 "c" 0 "c" +.br +where c is the character. If you want to delete certain characters, you +need to explicitly specify this, e.g.: +.br + 0 [a-z] 0 "" +.br +will delete all lower case Latin letters from the text. +.br +Below is an example of solving the identical SHIFT-IN/OUT sequences problem +using character set code -3 which I promissed above. Assume, that you +have 2 character sets in the input file, but switching between them is +accomplished by a "toggle" character. That is, if the toggle character is +found, you should switch to the other set. Also, if you want to use the +toggle character in the set, you need to double it. Let also assume that +we have 2 character codes which will never, ever appear. We can fool the +translit by changing toggle character to a unique character and backstepping +with character code -3 to check for SHIFT-IN/OUT sequences again. Let the +% sign be a toggle character, and that we have two codes (for example codes +\|\|\\\|\|254 and \|\|\\\|\|255) which will never appear in our text. +The appropriate entries in the transliteration table may look like: +.br + 1 {%([^%])} -3 {\|\|\\\|\254\|\|\\\|\|1} +.br + 2 {%([^%])} -3 {\|\|\\\|\255\|\|\\\|\|1} +.br + 0 "%%" 0 "%" +.br +i.e., when the single % is seen in set 1, produce SHIFT-OUT sequence +for set 2; and when a single % is seen in set 2, produce SHIFT-IN +sequence for set 1. The appropriate input character set definitions will be: +.br + 2 # number of input character sets +.br + "\|\|\\\|\|255" "" "" "" "" "" +.br + "\|\|\\\|\|254" "" "" "" "" "" +.br +However, be warned. I never tried this. If this trick does not work, +please let me know. +.sp 1 +.in -3m +Before you decide to create your own transliteration file, please examine +existing transliteration files. Do yourself (and others) a favor --- put +as many comments as possible there. If you allow others to use your +transliteration files, please include your name and e-mail address +and file creation date. +.in -4m +.sp 2 +Program matches the sequences in a specific order: +.in +4m +.ti -2m +\01) if NEST counter is zero, Match/substitute current set SHIFT-IN sequence +.ti -2m +\02) If matched, restore previous set number +.ti -2m +\03) If matched, restore previous set nest counter +.ti -2m +\04) Match/substitute input SHIFT-OUT sequences +.ti -2m +\05) If matched, save current set and start new one +.ti -2m +\06) If matched, zero nest counter for NEST sequences +.ti -2m +\07) Match/substitute transliteration sequences +.ti -2m +\08) If matched and code = -1 make substitution in input buffer and +continue matching the next sequence. +.ti -2m +\09) If matched and code = -2 make substitution and goto 7) +.ti -2m +10) If matched and code = -3 make substitution and goto 1) +.ti -2m +11) Match (no substitution) NEST-up and NEST-down to input buffer +.ti -2m +12) If NEST-up matched, increment counter for current set +.ti -2m +13) If NEST-down matched, decrement counter for current set +.ti -2m +14) If match in 7) send substitute sequence to output +.ti -2m +15) If no match in 7) (or code -1) output current input character +.ti -2m +16) Advance input pointer to point at new characters +.ti -2m +17) If End of File, break +.ti -2m +18) Goto 1) +.br +.fi + +.PP +.SH ASCII CHARACTER CODES +.nf +.ta 2m 6m 9m 13m 16m 20m 22m 26m 29m 33m 36m 40m + dec hx oct ch dec hx oct ch + + \0\00 00 000 ^@ NUL \064 40 100 @ + \0\01 01 001 ^A SOH \065 41 101 A + \0\02 02 002 ^B STX \066 42 102 B + \0\03 03 003 ^C ETX \067 43 103 C + \0\04 04 004 ^D EOT \068 44 104 D + \0\05 05 005 ^E ENQ \069 45 105 E + \0\06 06 006 ^F ACK \070 46 106 F + \0\07 07 007 ^G BEL \071 47 107 G + \0\08 08 010 ^H BS \072 48 110 H + \0\09 09 011 ^I HT \073 49 111 I + \010 0a 012 ^J LF \074 4a 112 J + \011 0b 013 ^K VT \075 4b 113 K + \012 0c 014 ^L FF \076 4c 114 L + \013 0d 015 ^M CR \077 4d 115 M + \014 0e 016 ^N SO \078 4e 116 N + \015 0f 017 ^O SI \079 4f 117 O + \016 10 020 ^P DLE \080 50 120 P + \017 11 021 ^Q DC1 \081 51 121 Q + \018 12 022 ^R DC2 \082 52 122 R + \019 13 023 ^S DC3 \083 53 123 S + \020 14 024 ^T DC4 \084 54 124 T + \021 15 025 ^U NAK \085 55 125 U + \022 16 026 ^V SYN \086 56 126 V + \023 17 027 ^W ETB \087 57 127 W + \024 18 030 ^X CAN \088 58 130 X + \025 19 031 ^Y EM \089 59 131 Y + \026 1a 032 ^Z SUB \090 5a 132 Z + \027 1b 033 ^[ ESC \091 5b 133 [ + \028 1c 034 ^\\ FS \092 5c 134 \\ + \029 1d 035 ^] GS \093 5d 135 ] + \030 1e 036 ^^ RS \094 5e 136 ^ + \031 1f 037 ^_ US \095 5f 137 _ + \032 20 040 SP \096 60 140 ` + \033 21 041 ! \097 61 141 a + \034 22 042 " \098 62 142 b + \035 23 043 # \099 63 143 c + \036 24 044 $ 100 64 144 d + \037 25 045 % 101 65 145 e + \038 26 046 & 102 66 146 f + \039 27 047 ' 103 67 147 g + \040 28 050 ( 104 68 150 h + \041 29 051 ) 105 69 151 i + \042 2a 052 * 106 6a 152 j + \043 2b 053 + 107 6b 153 k + \044 2c 054 , 108 6c 154 l + \045 2d 055 - 109 6d 155 m + \046 2e 056 . 110 6e 156 n + \047 2f 057 / 111 6f 157 o + \048 30 060 0 112 70 160 p + \049 31 061 1 113 71 161 q + \050 32 062 2 114 72 162 r + \051 33 063 3 115 73 163 s + \052 34 064 4 116 74 164 t + \053 35 065 5 117 75 165 u + \054 36 066 6 118 76 166 v + \055 37 067 7 119 77 167 w + \056 38 070 8 120 78 170 x + \057 39 071 9 121 79 171 y + \058 3a 072 : 122 7a 172 z + \059 3b 073 ; 123 7b 173 { + \060 3c 074 < 124 7c 174 | + \061 3d 075 = 125 7d 175 } + \062 3e 076 > 126 7e 176 ~ + \063 3f 077 ? 127 7f 177 DEL + +.br + +.SH CONVERSION: DECIMAL<-->OCTAL<-->HEX. +.nf +.cs R 24 + 000 000 00 064 100 40 128 200 80 192 300 C0 + 001 001 01 065 101 41 129 201 81 193 301 C1 + 002 002 02 066 102 42 130 202 82 194 302 C2 + 003 003 03 067 103 43 131 203 83 195 303 C3 + 004 004 04 068 104 44 132 204 84 196 304 C4 + 005 005 05 069 105 45 133 205 85 197 305 C5 + 006 006 06 070 106 46 134 206 86 198 306 C6 + 007 007 07 071 107 47 135 207 87 199 307 C7 + 008 010 08 072 110 48 136 210 88 200 310 C8 + 009 011 09 073 111 49 137 211 89 201 311 C9 + 010 012 0A 074 112 4A 138 212 8A 202 312 CA + 011 013 0B 075 113 4B 139 213 8B 203 313 CB + 012 014 0C 076 114 4C 140 214 8C 204 314 CC + 013 015 0D 077 115 4D 141 215 8D 205 315 CD + 014 016 0E 078 116 4E 142 216 8E 206 316 CE + 015 017 0F 079 117 4F 143 217 8F 207 317 CF + 016 020 10 080 120 50 144 220 90 208 320 D0 + 017 021 11 081 121 51 145 221 91 209 321 D1 + 018 022 12 082 122 52 146 222 92 210 322 D2 + 019 023 13 083 123 53 147 223 93 211 323 D3 + 020 024 14 084 124 54 148 224 94 212 324 D4 + 021 025 15 085 125 55 149 225 95 213 325 D5 + 022 026 16 086 126 56 150 226 96 214 326 D6 + 023 027 17 087 127 57 151 227 97 215 327 D7 + 024 030 18 088 130 58 152 230 98 216 330 D8 + 025 031 19 089 131 59 153 231 99 217 331 D9 + 026 032 1A 090 132 5A 154 232 9A 218 332 DA + 027 033 1B 091 133 5B 155 233 9B 219 333 DB + 028 034 1C 092 134 5C 156 234 9C 220 334 DC + 029 035 1D 093 135 5D 157 235 9D 221 335 DD + 030 036 1E 094 136 5E 158 236 9E 222 336 DE + 031 037 1F 095 137 5F 159 237 9F 223 337 DF + 032 040 20 096 140 60 160 240 A0 224 340 E0 + 033 041 21 097 141 61 161 241 A1 225 341 E1 + 034 042 22 098 142 62 162 242 A2 226 342 E2 + 035 043 23 099 143 63 163 243 A3 227 343 E3 + 036 044 24 100 144 64 164 244 A4 228 344 E4 + 037 045 25 101 145 65 165 245 A5 229 345 E5 + 038 046 26 102 146 66 166 246 A6 230 346 E6 + 039 047 27 103 147 67 167 247 A7 231 347 E7 + 040 050 28 104 150 68 168 250 A8 232 350 E8 + 041 051 29 105 151 69 169 251 A9 233 351 E9 + 042 052 2A 106 152 6A 170 252 AA 234 352 EA + 043 053 2B 107 153 6B 171 253 AB 235 353 EB + 044 054 2C 108 154 6C 172 254 AC 236 354 EC + 045 055 2D 109 155 6D 173 255 AD 237 355 ED + 046 056 2E 110 156 6E 174 256 AE 238 356 EE + 047 057 2F 111 157 6F 175 257 AF 239 357 EF + 048 060 30 112 160 70 176 260 B0 240 360 F0 + 049 061 31 113 161 71 177 261 B1 241 361 F1 + 050 062 32 114 162 72 178 262 B2 242 362 F2 + 051 063 33 115 163 73 179 263 B3 243 363 F3 + 052 064 34 116 164 74 180 264 B4 244 364 F4 + 053 065 35 117 165 75 181 265 B5 245 365 F5 + 054 066 36 118 166 76 182 266 B6 246 366 F6 + 055 067 37 119 167 77 183 267 B7 247 367 F7 + 056 070 38 120 170 78 184 270 B8 248 370 F8 + 057 071 39 121 171 79 185 271 B9 249 371 F9 + 058 072 3A 122 172 7A 186 272 BA 250 372 FA + 059 073 3B 123 173 7B 187 273 BB 251 373 FB + 060 074 3C 124 174 7C 188 274 BC 252 374 FC + 061 075 3D 125 175 7D 189 275 BD 253 375 FD + 062 076 3E 126 176 7E 190 276 BE 254 376 FE + 063 077 3F 127 177 7F 191 277 BF 255 377 FF +.cs R +.br +.sp +.fi + +.SH INSTALLATION +Program is given in a source form. It was tried under UN*X, VMS and +MS-DOS systems and ran. The file \fIreadme.doc\fR contains the details +on how to obtain the whole package. You can retrieve this file +from anonymous ftp on kekule.osc.edu in the directory /pub/russian/translit. +You can also obtain it via e-mail by sending a message: +.br + get translit/readme.doc from russian +.br +to OSCPOST@osc.edu or OSCPOST@OHSTPY.BITNET. +.sp +The source of the program consists of several files: +.br +.IP \fIpaths.h\fR +must be edited before compilation. It contains its +own comments what to do. The defines in this file relate to the operating +system you are using and the default path for searching transliteration +table. +.br +.IP \fItranslit.c\fR +It contains the main program. +This was intended to be a portable code. +.br +.IP \fIreg_exp.h\fR +the include file for regular expression matching +library of Henry Spencer from the University of Toronto. This regular +expression package was posted to comp.sources.misc (volume 3). Also 4 patches +were posted (in volumes: 3, 4, 4, 10). I applied the patches to the original +code and made small modifications to the code, which are marked in the +source code. +.br +.IP \fIreg_exp.c\fR +the regular expression library for compilation and +matching of regular expressions. +.br +.IP \fIreg_sub.c\fR +the regular expression substitution routine. +.br +.sp +.PP +Before you compile this program you have to edit \fIpaths.h\fR. +Read comments in the file. +During compilation, all source code should reside in the +current directory. +.br +Then you may compile the program under UN*X as (for example): +.br + cc -o translit translit.c reg_exp.c reg_sub.c +.br +and copy the program \fItranslit\fR to some standard directory which is +in users' path (for example: /usr/local/bin). Then you need to copy +transliteration tables to the directory which you have chosen in \fIpaths.h\fR. +If you get errors, then it is not OK. Please, report them to the author (with +all the gory details: error message, line number, machine, operating system, +etc.). +.sp +Under VMS (VAXes) you need to compile it as: +.br + cc translit +.br + cc reg_exp +.br + cc reg_sub +.br + link translit+reg_exp+reg_sub,sys$library:vaxcrtl/lib +.br +and before you can use the program, you need to type (or better put into your +LOGIN.COM file) a line: +.br + translit == "$SYS$USER:[ME.TRA]TRANSLIT.EXE" +.br +or whatever is the full path to the \fItranslit\fR executable image which +you created with LINK. Note the quotes and the $ sign in front of program +path. +.sp +On an IBM-PC I used MicroSoft C 5.1 as: +.br +.in +2m +.ti -1m +cl /FeTRANSLIT /AL /FPc /W1 /F 5000 /Ox /Gs translit.c reg_exp.c reg_sub.c +.in -2m +.sp 2 +.SH RULES, CONDITIONS AND AUTHOR'S WHISHES +You can distribute this code and associated files under these conditions: +.br +.in +4m +.ti -2m + 1) You will distribute all files (even if you +think that they are garbage). You may get the complete set from anonymous +ftp at kekule.osc.edu in /pub/russian/translit. You can also get the program +and associated files via e-mail. To get the instructions for e-mail +distribution send a line: +.br + send translit/readme.doc from russian +.br +to OSCPOST@osc.edu or OSCPOST@OHSTPY.BITNET. +You are not allowed to distribute the incomplete distribution. The following +files should be present in the distribution: +.ta 2m 22n +.nf + alt-gos.rus - ALT to GOSTCII table + alt-koi8.rus - ALT to KOI8 table + example.alt.uu - uuencoded example in ALT + example.ko8.uu - uuencoded example in KOI8 + example.pho - phonetic transliteration example + example.tex - LaTeX example + gos-alt.rus - GOSTCII to ALT table + gos-koi8.rus - GOSTCII to KOI8 table + koi7-8.rus - KOI7 to KOI8 table + koi7nl-8.rus - KOI7 (no Latin) to KOI8 table + koi8-7.rus - KOI8 to KOI7 table + koi8-alt.rus - KOI8 to ALT table + koi8-gos.rus - KOI8 to GOSTCII table + koi8-lc.rus - KOI8 to Library of Congress table + koi8-phg.rus - KOI8 to GOST transliteration + koi8-php.rus - KOI8 to Pokrovsky transliteration + koi8-ltx.rus - KOI8 to LaTeX conversion + koi8-tex.rus - KOI8 to Plain TeX conversion + order.txt - Order form for ordering the program + paths.h - Include file for translit.c + phg-koi8.rus - GOST transliteration to KOI8 + pho-8sim.rus - Simple phonetic to KOI8 + pho-koi8.rus - Various phonetic to KOI8 + php-koi8.rus - Pokrovsky to KOI8 + readme.doc - short description of the files + reg_exp.c - regular expression code by Henry Spencer + reg_exp.h - include for reg_exp.c and reg_sub.c + reg_sub.c - regular expression code by H. Spencer + ltx-koi8.rus - LaTeX to KOI8 + translit.c - TRANSLIT main program + translit.ps - TRANSLIT manual in PostScript + translit.1 - TRANSLIT manual in *roff + translit.txt - Plain ASCII TRANSLIT manual +.sp 1 +.fi +.ti -2m + 2) You may expand/change the files and the program and distribute modified +files, provided that you do +not delete anything (you can always comment the unnecessary portions out) +and clearly mark your changes. Please send the copy of the modified +version to the author, though you are not required to do so. +I will give you all the credit for your enhancements. I simply wish that +there is a single point of distribution for this code, so it is maintained +to some extent. If you create additional transliteration definition files, +please, send them to the author if you may. I will add them to the program +distribution. I want to fix bugs and expand/optimize this code, +but I need your help. +I need your transliteration files for languages which I do not know or +do not use currently. +Your suggestions for improving documentation are most welcome (I am not +a native English speaker). +.ti -2m +3) You will not charge money for the program and/or associated files, +except for media and copying costs. If you want to sell it, contact the author +first. Bear in mind +that the regular expression package by Henry Spencer has some +copyright restrictions. +But there are other regular expression packages which do not have these +restrictions (which are not violated by this offering). +.ti -2m +4) I will gladly help you with advice on compiling this software and +try to fix bugs when time allows. However, if you want a ready to run +executable, you need to order it for a very nominal fee from +\fIJKL ENTERPRISES, INC.\fR as described in the file \fIorder.txt\fR +which must be a part of a complete distribution. +.in -4m + +.SH AUTHOR +Jan Labanowski, P.O. Box 21821, Columbus, OH 43221-0821, USA. +E-mail: jkl@osc.edu, JKL@OHSTPY.BITNET. + diff --git a/support/translit/translit.c b/support/translit/translit.c new file mode 100644 index 0000000000..bebf3b941a --- /dev/null +++ b/support/translit/translit.c @@ -0,0 +1,1752 @@ + +/* This is a program fom transliterating files from one character set to + another. + TRANSLIT --- Version 1.02, April 4, 1993. + Copyright (c) by Jan Labanowski, 1993 and JKL Enterprises, Inc. + Permission is given to disribute this program freely in accordance with + the rules and conditions spelled out in the program documentation. If you + got this program without the documentation, or if some files were missing, + somebody must have violated the rules. In this case, please delete the the + program and obtain the information on how to get the complete distribution + from the author. The rules require that the whole package is distributed + (i.e., the source code, the transliteration tables, and the documentation). + + 3/29/93 Jan Labanowski. Thanks to Leonid A. Broukhis (leo@ipmce.su) + I noticed that translit will not work correctly if SHIFT-IN and SHIFT-OUT + is the same sequence. The modification was made in which code detecting + SHIFT-IN and SHIFT-OUT exchanged places (i.e., program looks for SHIFT-IN + before it looks for SHIFT-OUT) + + Author: Jan Labanowski, P.O.Box 21821, Columbus, OH 43221-0821, USA + E-mail: jkl@osc.edu, JKL@OHSTPY.BITNET + */ + +#include "paths.h" /* for local definitions */ +#include "reg_exp.h" /* for regexp package */ + + +#define OPTIONS "i:o:t:d" /* allowed options on command line */ +#define MAXPAIRS 1000 /* maximum number of conversion pairs */ +#define MAXSETS 10 /* maximum number of shift in/out sets */ +#define MAXLEVEL 10 /* maximum set nesting level */ +#define MAXBUFF 1000 /* maximum size of the buffer */ +#define MAXMATCH 100 /* maximum length of match to regular exp. */ + + +/* define all local functions as static if compiler likes it */ +#if STATICFUN +#define STATIC static +#else +#define STATIC +#endif + +/* types to hold the translation maps for single chars. If inp_maps is of + * type IMAPP, then character of code c in set k will correspond to + * a string pointed by (*inp_maps[k])[c]; + */ + +/* ========== now include definitions for paths and regexp */ + + +typedef char* IMAP[256]; /* type IMAP is a 256 element array + of pointers to string */ +typedef IMAP* IMAPP[MAXSETS]; /* array of pointers to IMAP */ + +/* types to hold output set number for a single char. if out_sets is of type + * OSETP and c is a code, and k is the set of input character, then output + * set number is (*out_sets[k])[c]; */ +typedef int OSET[256]; +typedef OSET* OSETP[MAXSETS]; + + +typedef union { + char *seq; /* pointer to a string */ + reg_exp *re; /* pointer to a regular expression "program */ + } ADDR; + + +typedef struct { + int typ; /* type of pointer in ADDR union: + 0-string (seq), 1-input regexp (re), + 2-output regexp (seq) (output regexp + is a string !)*/ + int len; /* length of a string if present */ + int set; /* character set number for the string */ + ADDR ad; /* string or regexp program */ + } SDATA; + + +/* Some compiler represent character codes > 127 as negative numbers, i.e., + * character 255 is -1, char 254 is -2, etc. + * The flag SIGNED_CHAR_TYPE is set by the program, (program checks which + * convention is used. It is set to 1, if characters have sign (i.e., 255=-1) + * and is set to 0 if characters are unsigned (i.e., 255=255). Do not touch + * this declaration, unless you know what you are doing. + */ +int SIGNED_CHAR_TYPE; + + char tabline[MAXBUFF]; /* line of text from conversion table file */ + char last_tab_line[MAXBUFF]; + char *lineptr; /* pointer to the first unread character of tabline */ + int n_line_chars; /* number of characters in tabline buffer */ + int chars_left; /* no. of chars left in input buffer */ + + int memleft; /* tells how much memory is left in allocated area */ + char *memptr; /* pointer for memory allocation area */ + char regerrstr[100]; /* string to hold error message from regular exp */ + reg_exp *regauxptr; /* aux pointer for regular expresion structure */ + int debug_flg=0; /* if 1, then additional info sent to stderr */ + + FILE *inpf; /* input file pointer */ + FILE *outf; /* output file pointer */ + FILE *tabl; /* file with translation table */ + + int n_conv_seq; /* number of conversion sequences */ + SDATA inp_data[MAXPAIRS]; /* structure to hold types, lengths and pointers + for input sequences */ + SDATA out_data[MAXPAIRS]; /* structure to hold types lengths and pointers + for output sequences */ + SDATA inp_SO_data[MAXSETS]; /* structure with types, lens, ptrs for inp_SO*/ + SDATA inp_SO_subs[MAXSETS]; /* holds substitution string/regexp for inp_SO*/ + SDATA inp_SI_data[MAXSETS]; /* structure with types, lens, ptrs for inp_SI*/ + SDATA inp_SI_subs[MAXSETS]; /* holds substitution string/regexp for inp SI*/ + SDATA inp_nest_open[MAXSETS]; /* for sick transliteration cases, like TeX */ + SDATA inp_nest_close[MAXSETS]; /* where you need to count {} pairs */ + + SDATA *junky; + + IMAPP inp_maps; /* maps for single character sequences, + array of pointers. Element of the array is a pointer + to the array of pointers which point at strings */ + OSETP out_sets; /* output set numbers corresponding to inp_maps + array of pointers to integer pointers */ + int n_inp_sets; /* number of input sets */ + int n_out_sets; /* number of output sets */ + char *out_SI[MAXSETS]; /* pointer to output shift in sequences */ + char *out_SO[MAXSETS]; /* pointer to output shift out sequences */ + int out_SI_len[MAXSETS]; /* out SI sequence length */ + int out_SO_len[MAXSETS]; /* out SO sequence length */ + + char *begseq, /* sequence to be written at the beginning of output*/ + *endseq; /* sequence to be written at the end of output file */ + + int file_version; /* conversion table version number */ + int strstart, strend, /* codes delimiting strings */ + liststart, listend, /* codes delimiting lists */ + regexstart, regexend, /* codes delimiting expressions */ + curst1, curend1, + curst2, curend2; /* auxiliary */ + + char scr1[MAXBUFF], scr2[MAXBUFF], /* scratch space */ + scr1a[MAXBUFF], scr2a[MAXBUFF]; /* scratch space */ + char *scr1ptr, *scr2ptr, *scr1pt, *scr2pt, + *scrauxptr, *scrcurptr; /* aux string pointers */ + + int inp_seq_length; /* length of input sequence */ + int out_seq_length; /* length of output sequence */ + int out_set_number; /* number of output set */ + char *out_seq_ptr; /* pointer to output sequence */ + + reg_exp *reg_comp(); + int reg_try(); + void reg_sub(); + void reg_error(); + +/* fix if no strchr routine in the libarry */ +#if STRCHR +#else +#define strchr indexfun +#endif + +/* this is index which is equivalent to strchr */ +char *indexfun (s, c) +char *s; +int c; + { + while (*s) + if (c == *s) return (s); + else s++; + return (NULL); + } + + +/* ============================================================ */ + +/* include code for getopt() if not known to compiler */ + +#if GETOPT +#else + +/* + This is a some getopt I took from the net and do not remember + who actually wrote this +*/ + +#define ARGCH (int)':' +#define BADCH (int)'?' +#define EMSG "" +#define ENDARGS "--" + +/* + * get option letter from argument vector + */ +int opterr = 1, /* useless, never set or used */ + optind = 1, /* index into parent argv vector */ + optopt; /* character checked for validity */ +char *optarg; /* argument associated with option */ + +#define tell(s) fputs(*nargv,stderr);fputs(s,stderr); \ + fputc(optopt,stderr);fputc('\n',stderr);return(BADCH); + + +STATIC int getopt(nargc,nargv,ostr) +int nargc; +char **nargv, + *ostr; +{ + static char *place = EMSG; /* option letter processing */ + register char *oli; /* option letter list index */ + + if(!*place) { /* update scanning pointer */ + if(optind >= nargc || *(place = nargv[optind]) != '-' || + !*++place) return(EOF); + if (*place == '-') { /* found "--" */ + ++optind; + return(EOF); + } + } /* option letter okay? */ + if ((optopt = (int)*place++) == ARGCH || !(oli = strchr(ostr,optopt))) { + if(!*place) ++optind; + tell(": illegal option -- "); + } + if (*++oli != ARGCH) { /* don't need argument */ + optarg = NULL; + if (!*place) ++optind; + } + else { /* need an argument */ + if (*place) optarg = place; /* no white space */ + else if (nargc <= ++optind) { /* no arg */ + place = EMSG; + tell(": option requires an argument -- "); + } + else optarg = nargv[optind]; /* white space */ + place = EMSG; + ++optind; + } + return(optopt); /* dump back option letter */ +} + +#endif + + +/* ================= charcode ====================== + * returns the code of the character given its integer code. If global + * variable SIGNED_CHAR_TYPE flag is 1, then character code is negative + * for chars >= 128, otherwise they are passed through. + * ================================================== */ +STATIC char charcode (intcde) +int intcde; +{ + if(SIGNED_CHAR_TYPE == 1) { /* if signed chars used */ + if(intcde >= 128) { /* if integer code is larger than 128 */ + return((char)(intcde - 256)); /* make it negative complement */ + } + else { /* return the original code */ + return((char)intcde); + } + } + else { + return((char)intcde); + } +} +/* ================= intcode ===================== + * returns integer code of a character depending on the value of + * SIGNED_CHAR_TYPE flag + * =============================================== */ +int intcode(charcde) +char charcde; +{ + if(SIGNED_CHAR_TYPE == 1) { /* if signed chars used */ + if((int)charcde < (int)0) { /* if negative code */ + return((int)((int)charcde + 256)); /* convert to positive */ + } + else { /* return the original code */ + return((int)charcde); + } + } + else { + return((int)charcde); + } +} + +/* ================= tablerr ====================== + * terminates the program with a message to stderr and contents of + * the buffer. num - exit status, errmsg - message + * ================================================ */ +STATIC int tablerr(num, errmsg) +int num; +char *errmsg; +{ + fprintf(stderr,"%s\n", errmsg); + fprintf(stderr, + "Current contents of the input buffer for conversion table file:\n"); + fprintf(stderr,"%s\n", last_tab_line); + exit(num); + return(0); /* to keep compiler happy that there is return from function */ +} + +/* ================= getnblkline ==================== + * gets a nonblank line from tabl file and resets pointers if clearflg == 1, + * otherwise, appends the line to the current buffer. + * Line is stored in the global variable tabline. The global *lineptr + * is reset to line beginning. + * If EOF reached, or line too long, returns -1, else a number of chars in + * the line. If line starts with # or ! in first column, it is skipped. + * ================================================== */ +STATIC int getnblkline(fileptr, clearflg) +FILE *fileptr; +int clearflg; +{ + int l, maxc; + char *auxptr; + if(clearflg == 1) { + n_line_chars = 0; + lineptr = tabline; + } + maxc = MAXBUFF - n_line_chars -2; /* how much space in the buffer */ + while (fgets (lineptr, maxc, fileptr) != NULL) { + strcpy(last_tab_line, lineptr); /* save current line for error messages */ + if((*lineptr == '#') || (*lineptr == '!')) { /* skip comment lines */ + continue; + } + l = strlen(lineptr); /* how many chars we read ? */ + n_line_chars += l; /* how many chars in the buffer */ + + if(n_line_chars > MAXBUFF-5) { /* if line too long */ + return(-1); + } + if(clearflg == 1) { /* do it only if first line is fetched */ + auxptr = lineptr; + while ((isspace(*auxptr) != 0) && (*auxptr != '\0')) { + auxptr++; /* skip front spaces */ + } + + if(*auxptr == '\0') { /* if blank line */ + continue; + } + } + return(l); /* return length of line just read */ + } /* end while */ + return(-1); /* end of file found */ +} +/* ================= chknblk ========================== + * returns a code of the first nonblank character at the current position + * of tabline buffer. The lineptr is left at this char (NOT AT THE NEXT CHAR ! + * If no nonblank * character, returns -1. + * ==================================================== */ +STATIC int chknblk(fileptr) +FILE *fileptr; +{ + int ch; + + Fetch_next: + while (*lineptr != '\0') { + if(isspace(*lineptr) == 0) { + ch = intcode(*lineptr); + return(ch); + } + lineptr++; + } + if(getnblkline(fileptr, 0) > 0) { + goto Fetch_next; + } + else { + return(-1); + } +} + +/* ================= getnumber =========================== + * retrieves integer nonnegative decimal number from a the current + * line (tabline). + * Returns the number, or -9999 if no good number in the line + * only number < 1000 allowed + * ========================================================== */ +STATIC int getnumber(fileptr) +FILE *fileptr; +{ + int num, flg, sign; + num = 0; + flg = 0; + sign = 0; + +Next_line: + while (*lineptr != '\0') { + if(flg == 0) { /* only spaces found till now */ + if(isspace(*lineptr) != 0) { + lineptr++; + continue; + } + else { + flg = 1; /* the nonblank char found */ + } + } + + if(flg == 1) { /* the nonblank char was found */ + if(sign == 0) { /* sign may only be located before the number */ + if(*lineptr == '-') { + sign = -1; + lineptr++; + } + else if(*lineptr == '+') { + sign = 1; + lineptr++; + } + else { /* set it to +1, so it is checked only once */ + sign = 1; + } + } + if(isdigit(*lineptr) != 0) { + num = 10*num + *lineptr - '0'; + if(num > 1000) { + return(-9999); /* number too large */ + } + } + else if(isspace(*lineptr) != 0) { /* end of number */ + return(num*sign); + } + else { + return(-9999); /* some strange character */ + } + } + lineptr++; /* to next character */ + } + if(flg == 1) { /* if valid number collected before '\0' */ + return(num*sign); + } + else { + if(getnblkline(fileptr, 0) > 0) { + goto Next_line; + } + else { + return(-9999); /* if no number before end of file, error */ + } + } +} + + +/* ================= getstring ========================== + * returns the pointer to the string from the tabline. The pointer is + * volatile, and will point to garbage after next getnblkline call, so + * you need to copy it (or use it) immedaitely after the call. + * Returns a pointer to string if successful, and NULL pointer if not. + * startcode --- character code which starts the string (it is not + * included in the string. If startcode = '\0', the + * string is collected from the curent pointer to a buffer. + * endcode --- character which ends the string. It is not included in + * the string. If endcode = '\0', then string is collected + * until first blank or end of string found. + * If no startcode found or no endcode found, the NULL string is returned. + * ========================================================= */ + +STATIC char *getstring(startcode, endcode, fileptr) +int startcode, endcode; +FILE *fileptr; +{ + int flg; + char *startptr; + + flg = 0; +Read_next_line: + while (*lineptr != '\0') { + if(flg == 0) { /* if startcode not found yet */ + if(startcode != 0) { + if(charcode(startcode) == *lineptr) { + flg = 1; /* the startcode found */ + lineptr++; + startptr = lineptr; /* skip startcode */ + continue; + } + else { + lineptr++; + continue; + } + } + else { /* startcode is 0 */ + flg = 1; + startptr = lineptr; + lineptr++; + continue; + } + } /* end flg == 0 */ + + if(flg == 1) { /* the 1st char was found */ + if(endcode == 0) { /* if stop on blank requested */ + if(isspace(*lineptr) != 0) { /* if space found */ + *lineptr = '\0'; /* mark string end */ + lineptr++; /* advance pointer */ + return(startptr); + } + else { /* collect chars */ + lineptr++; + continue; + } + } + else if(charcode(*lineptr) == endcode) { /* if stop at endcode */ + *lineptr = '\0'; + lineptr++; + return(startptr); + } + else { /* if not endcode , collect next characters */ + lineptr++; + continue; + } + } /* end flg == 1 */ + } /* end while */ + + /* the buffer was exhausted */ + if(endcode == 0) { + return(startptr); + } + else { + if(getnblkline(fileptr, 0) > 0) { + goto Read_next_line; + } + else { + return((char *)NULL); + } + } +} + +/* ============================ convnum =================== + * returns a nonegative number based on str. Scans the string + * from position posbeg, and returns first invalid character position + * in posend. If error, returns -1 (less than 2 characters, num > 255). + * str - scanned string + * digits string of allowed ordered digits in lowercase + * posbeg - start + * ======================================================== */ + +STATIC int convnum(buff, digits, posbeg) +char *buff, *digits; +int posbeg; +{ + int num, i, l, d, base; + + base = strlen(digits); + num = 0; + i = posbeg; + + while (buff[i] != '\0') { + d = -1; + for(l = 0; l < base; l++) { + if(buff[i] == digits[l]) { + d = l; + break; + } + } + if(d >= 0) { + num = d + num*base; + if(num > 255) { /* if code too large */ + return(-1); + } + i++; + } + else { + break; + } + } + if((i - posbeg) < 2) { /* if less than two characters in a number */ + return(-1); + } + buff[i] = '\0'; + return(num); +} + + +/* ============================ str2code ================== + * str2code returns a code specified in buff. The valid numbers must have at + * least 2 digits. Here is a format of the code string + * (n represents valid digit for a given base). + * nnn (up to 3 decimal digits, first is not zero) + * 0nnn (up to 3 octal digits) + * 0xnn (up to 3 hex digits) + * 0onnn (up to 3 octal digits) + * 0dnnn (up to 3 decimal digits) + * The buff string will have '\0' put at the position after a valid number + * If no valid number can be parsed, or number is greater than 255, -1 + * is returned. + * ======================================================== */ +STATIC int str2code(buff) +char *buff; +{ + int i, l, num; + static char decdig[]="0123456789", + octdig[]="01234567", + hexdig[]="0123456789abcdef"; + + l = strlen(buff); /* get length */ + if(l < 2) { /* string too short */ + return(-1); + } + + for(i = 0; i < l; i++) { /* convert to lowercase */ + if(isalpha(buff[i]) != 0) { /* if letter */ + buff[i] = tolower(buff[i]); + } + } + + if(isdigit(buff[0]) == 0) { /* if first char not a digit */ + return(-1); + } + + if(buff[0] == '0') { /*if starting char is 0, then octal */ + if((num = convnum(buff, octdig, 0)) != -1) { /* check if no base */ + return(num); + } + } + else { /* this has to be a decimal number */ + if((num = convnum(buff, decdig, 0)) != -1) { + return(num); + } + else { /* error in decimal number */ + return(-1); + } + } + /* the base is specified at buff[1] */ + if(buff[1] == 'o') { + num = convnum(buff, octdig, 2); + } + else if(buff[1] == 'd') { + num = convnum(buff, decdig, 2); + } + else if(buff[1] == 'x') { + num = convnum(buff, hexdig, 2); + } + else { /* no base found */ + return(-1); + } + return(num); +} + +/* ================= convstr ======================== + * copies inp_string to out_strings, and when codes are given as \xxx + * converts them to characters. + * Returns: + * 0 if OK + * 1 if character zero (e.g., \00 or \0x0) is found (it ends the string + * processing, since it is string terminator). + * =================================================== */ +STATIC int convstr(inp_string, out_string) +char *inp_string, *out_string; +{ + int ch, ch1, i, l, num, n; + char buff[8]; + + n = 0; + while ((ch = *inp_string) != '\0') { + n++; /* count characters */ + if(ch == '\\') { + /* skip blank sequence */ + ch1 = *(inp_string + 1); /* charcode following "\" */ + if(isspace(ch1) != 0) { /* if "\" followed by blanks */ + inp_string++; /* skip over "\" */ + n++; + while( isspace((*inp_string)) != 0) { /* skip all spaces */ + n++; + inp_string++; + } + n--; /* it will be advanced at the top of loop */ + ch = *inp_string; + if(ch == '\0') { + *out_string = '\0'; + return(0); + } + continue; /* start new loop turn */ + } /* ch is space */ + + /* now check is \020, etc., i.e., codes */ + for(i = 1; i <= 6; i++) { /* copy possible number to a buffer */ + buff[i-1] = *(inp_string+i); + } + buff[6] = '\0'; /* terminate buff */ + if((num = str2code(buff)) >= 0) { + *out_string++ = charcode(num); + /* find how many characters have beed used ( number + \ ) */ + if(num == 0) { + *out_string = '\0'; + return(1); + } + l = strlen(buff) + 1; + inp_string += l; + continue; + } + } + *out_string++ = *inp_string; + inp_string++; + } /* end while */ + *out_string = '\0'; + return(0); +} + + +/* ====================== compstr ======================== + * returns 1 if str1 is located at the beginning of str2 and 0 otherwise + * ======================================================= */ +STATIC int compstr(str1, str2) +char str1[], str2[]; +{ + int i; + if(str1[0] == '\0') { /* empty sequence never matches */ + return(0); + } + for(i = 0; str1[i] != '\0'; i++) { + if(str1[i] != str2[i]) { + return(0); + } + } + return(1); +} + +/* ====================== chkseqs ============================ + * returns the sequence number if sequence is present at the beginning + * of buffer and -1 otherwise (first sequence has number 0); + * If regular expression, then SDATA.len is set to the length of + * the string which matches the regular expession. + * ============================================================= */ +STATIC int chkseqs(n_seq, seqstruc, buff) +int n_seq; +SDATA *seqstruc; +char *buff; +{ + int i, j, l; + char *sp, *ep, *str; + reg_exp *reaux; + + if(n_seq == 0) { + return(-1); + } + for (i = 0; i < n_seq; i++) { + if(seqstruc->typ == 0) { /* if plain string */ + str = (seqstruc->ad).seq; + if(*str != '\0') { + l = 1; + for(j = 0; *str != '\0'; j++) { + if(*(buff + j) != *str++) { + l = 0; + break; + } + } + if(l == 1) { + return(i); + } + } + } + else if(seqstruc->typ == 1) { /* regexp */ + if(reg_try((seqstruc->ad).re, buff) == 1) { /* if anchored match found */ + reaux = (seqstruc->ad).re; /* get address of search program */ + sp = reaux->startp[0]; /* address of 1st char of match */ + ep = reaux->endp[0]; /* next char after match */ + if(sp != buff) { /* matches are anchored, at the buff beginning ! */ + tablerr(10, "Internal error in regexp package\n"); + } + l = seqstruc->len = ep - sp; /* match length */ + if(l <= 0) { + fprintf(stderr,"Error when matching regular expression %d\n", i+1); + exit(10); + } + return(i); + } + } + seqstruc++; + } /* end for */ + return(-1); +} + +/* =================== rdelim ================== + * read delimiters from tabl file + * ============================================= */ +STATIC int rdelim(startd, endd) +int *startd, *endd; +{ + if(getnblkline(tabl, 1) < 0) { + tablerr(10, "Could not read left delimiter code"); + } + if((*startd = chknblk(tabl)) < 0) { + tablerr(10, "Could not read left delimiter code"); + } + lineptr++; /* point at next char */ + if(isspace(*lineptr) == 0) { + tablerr(10, + "(Left Delimiter):Delimiters should be single chars separated by spaces"); + } + if((*endd = chknblk(tabl)) < 0) { + tablerr(10, "Could not read right delimiter code"); + } + lineptr++; /* point at next char */ + if(isspace(*lineptr) == 0) { + tablerr(10, + "(Right Delimiter):Delimiters should be single chars separated by spaces"); + } + return(0); +} + +/* ================== beseq ============== + * read starting or ending sequence for output + * and return pointer + * ======================================= */ +STATIC char* beseq() +{ + char *scr1pt, *scr2pt; + int l; + + if((getnblkline(tabl, 1) < 0) || + ((scr1pt = getstring(strstart,strend,tabl)) == (char*)NULL)) { + tablerr(10, "Error when reading starting/ending sequence"); + } + l = strlen(scr1pt) + 1; + if((scr2pt = (char*)malloc(l*sizeof(char))) == NULL) { + tablerr(10, "Out of memory"); + } + convstr(scr1pt,scr2pt); + return(scr2pt); +} + +/* ================= allomaps =============== + * Allocate space for maps + * ============================================ */ +STATIC int allomaps(n) +int n; +{ + int i; + /* Allocate space for inp_maps and out_sets for input set 0 */ + if((inp_maps[n] = (IMAP*)malloc(256*sizeof(char*))) == NULL) { + /*if failed */ + tablerr(10, "Out of memory for storing sequences"); + } + + if((out_sets[n] = (OSET*)malloc(256*sizeof(int))) == NULL) { /* if failed */ + tablerr(10, "Out of memory for storing sequences"); + } + + for(i = 0; i < 256; i++) { /* zero allocated memory */ + (*inp_maps[n])[i] = (char*)NULL; + (*out_sets[n])[i] = 0; + } + return(0); +} + +/* =================== savestring ================= + * saves string in the allocated storage and returns pointer to it + * does all the housekeeping + * ================================================== */ +STATIC char *savestring(str) +char *str; +{ + int l; + char *retptr; + + l = strlen(str)+1; + if(memleft < l) { + memleft = 5*MAXPAIRS; + if((memptr = (char*)malloc(memleft*sizeof(char))) + == NULL) { + tablerr(10,"Out of memory for allocation"); + } + } + strcpy(memptr, str); + retptr = memptr; + memptr += l; + memleft -= l; + return(retptr); +} + +/* ================= splitlist ================= + * unfolds the list [] to a list of characters (i.e. [a-d] = [abcd]) + * =============================================== */ +STATIC int splitlist(inlist, unflist) +char *inlist, *unflist; +{ + int ch, ch1, ch2, i, len; + + convstr(inlist, inlist); /* convert codes */ + len = strlen(inlist); + if(len == 0) { + tablerr(10, "Empty list specified"); + } + + *unflist++ = *inlist++; /* save first character */ + while ( *inlist != '\0') { + ch = *inlist; + if((ch != '-') || (*(inlist+1) == '\0')) { + *unflist++ = ch; + } + else { /* the minus is inside */ + ch1 = intcode(*(inlist-1)); + ch2 = intcode(*(inlist+1)); + if(ch2 <= ch1) { + tablerr(10, "The limits in the range within the list are reversed"); + } + for(i = ch1+1; i < ch2; i++) { + *unflist++ = charcode(i); + } + } + inlist++; + } + *unflist = '\0'; + return(0); +} + +/* ======================== regerror ================== + * regerror --- routine called from within a regexp package. Aborts + * program with message + * ==================================================== */ +void reg_error(s) +char *s; +{ + strcat(regerrstr,s); + tablerr(11,regerrstr); +} + +/* ======================== rdinshift ================== + * reads in a shift sequence, assuming that the getnblkline was called + * Fills in structure SDATA. If typ = 1, it is assumed that it is data + * for matching, if typ = 2, this is data to be output + * If OK, returns 0, else dies + * ======================================================= */ +STATIC int rdinshift(sdstr, sttyp) +SDATA *sdstr; +int sttyp; +{ + int mode1; + ADDR ads; + curst1 = chknblk(tabl); /* check what type delimiter */ + if(curst1 == strstart) { + mode1 = 1; + curend1 = strend; + } + else if(curst1 == liststart) { + mode1 = 2; + tablerr(10, "Lists not allowed for input SHIFT sequences"); + } + else if(curst1 == regexstart) { + mode1 = 3; + curend1 = regexend; + } + else { + tablerr(10, "Error when reading SHIFT input sequences"); + } + + if((scr1pt = getstring(curst1, curend1, tabl)) == (char*)NULL) { + tablerr(10, "Error when reading input SHIFT sequences"); + } + + convstr(scr1pt, scr1); /* convert codes in the sequence */ + scr1pt = savestring(scr1); /* save sequence in memory */ + strcpy(regerrstr, "Error in regexp for input SHIFT sequences:"); + + if(mode1 == 1) { + sdstr->typ = 0; /* common string */ + sdstr->len = strlen(scr1pt); + ads.seq = scr1pt; /* save string address */ + sdstr->ad = ads; + } + else if(mode1 == 3) { + if(sttyp == 1) { + sdstr->typ = 1; + regauxptr = reg_comp(scr1pt); + if(regauxptr == (reg_exp *)NULL) { + tablerr(10, "Error in regular expression"); + } + ads.re = regauxptr; + sdstr->ad = ads; + } + else { + sdstr->typ = 2; + sdstr->len = strlen(scr1pt); + ads.seq = scr1pt; + sdstr->ad = ads; + } + } + return(0); +} + +/* ========================= match_subs ========================== + * match_subs matches the match_data sequence description to the + * current position of the input file string (scrcurptr) and if match + * is found, finds the replacement string and puts it in scr1 buffer. + * it sets the global variables out_seq_length, out_seq_ptr, inp_seq_length + * out_set_number. Returns 1 on success, and 0 if match was not found. + * ================================================================== */ +STATIC int match_subs(match_data, repl_data) +SDATA *match_data, *repl_data; +{ + if(chkseqs(1, match_data, scrcurptr) >= 0) { + inp_seq_length = match_data->len; /*chkseqs sets it for inp.typ 1 */ + out_set_number = repl_data->set; + if(repl_data->typ == 2) { /* if regexp substitution */ + /* find a substitution string */ + regauxptr = (match_data->ad).re; /* pointer to regexp prog */ + /* scr contains the substitution string */ + reg_sub(regauxptr, (repl_data->ad).seq, scr1); + out_seq_length = strlen(scr1); /*number of chars in substitute */ + out_seq_ptr = scr1; /* pointer to substitute string */ + } + else { /* if plain string (type = 0) */ + out_seq_length = repl_data->len; + out_seq_ptr = (repl_data->ad).seq; + } + if(out_seq_length > MAXMATCH) { + fprintf(stderr, + "The substitution string is too long (%d chararacters):\n%s\n", + out_seq_length, out_seq_ptr); + exit(1); + } + return(1); + } + else { + return(0); + } +} + +/* =================== repl_inp ============================= + * replaces matching portion of an input text with a substitute string. + * ========================================================== */ +int repl_inp() +{ + int k, l, i; + + if(out_seq_length > MAXMATCH) { + fprintf(stderr, + "The output substitution sequence is too long (%d characters):\n%s\n", + out_seq_length, out_seq_ptr); + exit(1); + } + if(inp_seq_length >= out_seq_length) { /* do not have to copy strings */ + k = inp_seq_length - out_seq_length; /* diff in lengths */ + scrcurptr += k; /* move forwarde by the diff */ + chars_left -= k; + for (i = 0; i < out_seq_length; i++) { /* copy chars */ + *(scrcurptr + i) = *(out_seq_ptr + i); + } + } + else { /* have to push remaining chars to the right to make space */ + k = out_seq_length - inp_seq_length; /* diff in lengths */ + l = strlen(scrcurptr); /* length of input text */ + /* memmove could be used, but it is not in all libaries */ + for (i = l; i >= 0; i--) { /* move to right, start with terminating '\0' */ + *(scrcurptr + i + k) = *(scrcurptr + i); + } + for (i = 0; i < out_seq_length; i++) { /* place the output string */ + *(scrcurptr + i) = *(out_seq_ptr + i); + } + chars_left += k; /* update chars_left, scrcurptr not changed */ + } + return(0); +} + +/*======================== main ================================== */ + +int main(argc, argv) +int argc; +char **argv; +{ + char *tabl_file; /* name of file with conversion table */ + static char deftablfile[200]= + DEFCONVNAME; /* default conversion file name */ + static char deftablpath[200]= + TPATH; /* default conversion file path */ + char table_name[300]; /* working array for conversion table */ + + int level; /* input set nesting level */ + int inp_cur_set[MAXLEVEL];/* set input number being processed */ + int inp_cur_nest[MAXLEVEL]; /* current nesting count for input set */ + int cur_inp_set; /* current input set, same as inp_cur_set[level] */ + int out_cur_set; /* output set level being processed */ + int buffer_size; /* size of input buffer string */ + int opt; /* option letter */ + int mode1, mode2; /* type of string (1=str, 2=list, 3=regex) */ + + int flg, ch, i, j, k, l, n; /* aux variables */ + + +#if GETOPT + extern char *optarg; /* option argument from getopt */ + extern int optind, opterr; /* needed for getopt */ +#endif + + static char usage[]= + "Usage: translit [-i inpfil] [-o outfil] [-t convtabfil] [convtabfil]\n"; + + + inpf = stdin; /* initialize input to standard input */ /*UNIX*/ + outf = stdout; /* initialize output to standard output */ /*UNIX*/ + + /* set SIGNED_CHAR_TYPE flag */ + scr1[0] = '\372'; + if((int)scr1[0] < 0) { + SIGNED_CHAR_TYPE = 1; + } + else { + SIGNED_CHAR_TYPE = 0; + } + +/* if environment is supported */ +#if GETENV + /* if TRANSPATH variable defined, take its contents */ + if((scr1pt = getenv(TRANSPATH)) != (char *)NULL) { + strcpy(deftablpath, scr1pt); + } + if((scr1pt = getenv(DEFNAME)) != (char *)NULL) { + strcpy(deftablfile, scr1pt); + } +#endif + + tabl_file = deftablfile; /* default table file name */ + + flg = 0; /* set to no conv table given as an argument */ + i = j = k = 0; /* flags, for files specified: i-inp, j-out, k-tabl */ + while ((opt = getopt(argc, argv, OPTIONS)) != EOF) { + switch (opt) { + case 'd': + debug_flg = 1; + break; + case 'i': + if(i != 0) { + fprintf(stderr, "You specified option -i twice\n"); + return(1); + } + if((inpf = fopen(optarg, "r")) == NULL) { + fprintf(stderr,"Error: Could not find input file: %s\n", optarg); + return(1); + } + i = 1; + break; + case 'o': + if(j != 0) { + fprintf(stderr, "You specified option -o twice\n"); + return(1); + } + if((outf = fopen(optarg, "r")) != NULL) { + fprintf(stderr, + "Error: Output file: %s already exists! Delete it first.\n", optarg); + exit(3); + } + if((outf = fopen(optarg, "w")) == NULL) { + fprintf(stderr,"Error: Could not open output file: %s\n", optarg); + exit(2); + } + j = 1; + break; + + case 't': + if(k != 0) { + fprintf(stderr, "You specified option -t twice\n"); + return(1); + } + tabl_file = optarg; + flg = 1; + k = 1; + break; + case '?': + fprintf(stderr,"Error: %s\n", usage); + exit(3); + } /* end switch */ + } /* end while */ + + if(optind < argc) { /* check if translation table given w/o option -t */ + if(flg == 1) { + fprintf (stderr,"Error: You specified conversion table file twice\n"); + exit(4); + } + tabl_file = argv[optind]; + if(argc > optind + 1) { + fprintf (stderr,"Error: %s\n", usage); + exit(5); + } + } + + if((tabl = fopen(tabl_file, "r")) == NULL) { /* try to open file with table */ + strcpy(table_name, deftablpath); /* copy path to scratch string */ + strcat(table_name, tabl_file); + if((tabl = fopen(table_name, "r")) == NULL) { /* try to open path/file */ + fprintf(stderr,"Could not find the conversion table file: %s\n", + tabl_file); + exit(6); + } + } + + /* read in file version number */ + if((getnblkline(tabl, 1) < 0) || ((file_version = getnumber(tabl)) < 0)) { + tablerr(7, "Could not read file format number"); + } + if(file_version != 1) { + tablerr(10, "This format of conversion file is not supported"); + } + + /* read in delimiters */ + + rdelim(&strstart, &strend); + rdelim(&liststart, &listend); + rdelim(®exstart, ®exend); + + /* read in starting and ending sequences */ + begseq = beseq(); + endseq = beseq(); + + /* reserve memory for sequences */ + chars_left = 5*MAXPAIRS; /* size of allocated block */ + if((scr1ptr = (char*)malloc(chars_left*sizeof(char))) + == NULL) { + tablerr(10, "Out of memory for storing sequences"); + } + + /* Allocate space for inp_maps and out_sets for input set 0 */ + + allomaps(0); + + /* Read number of input sets */ + if((getnblkline(tabl, 1) <= 0) || ((n_inp_sets = getnumber(tabl)) < 0)) { + tablerr(10, "Error when reading input set count"); + } + + if(n_inp_sets >= MAXSETS) { + tablerr(10, "Too many input shift sequences"); + } + + /* read input SI/SO sequences */ + for (i = 0; i < n_inp_sets; i++) { + /* Allocate space for inp_maps and out_sets for input set i+1 */ + allomaps(i+1); + + /* read in input SHIFTs seq */ + if(getnblkline(tabl, 1) <= 0) { + tablerr(10, "Error when reading output shift sequences"); + } + rdinshift(&inp_SO_data[i], 1); + rdinshift(&inp_SO_subs[i], 2); + if((inp_SO_subs[i].typ == 2) && (inp_SO_data[i].typ == 0)) { + tablerr(10, + "Plain string type for matching and substitution expression for output"); + } + rdinshift(&inp_nest_open[i], 1); + rdinshift(&inp_nest_close[i], 1); + rdinshift(&inp_SI_data[i], 1); + rdinshift(&inp_SI_subs[i], 2); + if((inp_SI_subs[i].typ == 2) && (inp_SI_data[i].typ == 0)) { + tablerr(10, + "Plain string type for matching and substitution expression for output"); + } + + if(debug_flg == 1) { + if(inp_SO_data[i].typ == 0) { + fprintf(stderr,"%2d) inp_SO =|%s| ", i, (inp_SO_data[i].ad).seq); + } + else { + fprintf(stderr,"%2d) inp_SO =%d ", i, inp_SO_data[i].typ); + } + if((inp_SO_subs[i].typ == 0) || (inp_SO_subs[i].typ == 2)) { + fprintf(stderr,"%2d) inp_SOsub =|%s| ", i, (inp_SO_subs[i].ad).seq); + } + else { + fprintf(stderr,"%2d) inp_SOsub =%d ", i, inp_SO_subs[i].typ); + } + if(inp_nest_open[i].typ == 0) { + fprintf(stderr,"nest_open =|%s| ", (inp_nest_open[i].ad).seq); + } + else { + fprintf(stderr,"nest_open =%d ", inp_nest_open[i].typ); + } + if(inp_nest_close[i].typ == 0) { + fprintf(stderr,"nest_close =|%s| ", (inp_nest_close[i].ad).seq); + } + else { + fprintf(stderr,"nest_close =%d ", inp_nest_close[i].typ); + } + if(inp_SI_data[i].typ == 0) { + fprintf(stderr,"inp_SI =|%s|\n", (inp_SI_data[i].ad).seq); + } + else { + fprintf(stderr,"inp_SI =%d\n", inp_SI_data[i].typ); + } + if((inp_SI_subs[i].typ == 0) || (inp_SI_subs[i].typ == 2)) { + fprintf(stderr,"%2d) inp_SIsub =|%s| ", i, (inp_SI_subs[i].ad).seq); + } + else { + fprintf(stderr,"%2d) inp_SIsub =%d ", i, inp_SI_subs[i].typ); + } + } /* end debug_flg */ + } + + if((getnblkline(tabl, 1) <= 0) || ((n_out_sets = getnumber(tabl)) < 0)) { + /* read in out SHIFTs count */ + tablerr(10, "Error when reading output set count"); + } + if(n_out_sets > MAXSETS) { + tablerr(10, "Too many output SHIFT sequences requested"); + } + + for (i = 0; i < n_out_sets; i++) { + /* read in out SHIFTs seq */ + if((getnblkline(tabl, 1) <= 0) || + ((scr1pt = getstring(strstart, strend, tabl)) == (char*)NULL) || + ((scr2pt = getstring(strstart, strend, tabl)) == (char*)NULL)) { + tablerr(10, "Error when reading output shift sequences"); + } + convstr(scr1pt, scr1a); + out_SO_len[i]= strlen(scr1a); + out_SO[i] = savestring(scr1a); + + convstr(scr2pt, scr2a); + out_SI_len[i] = strlen(scr2a); + out_SI[i] = savestring(scr2a); + if(debug_flg == 1) { + fprintf(stderr,"%2d) out_SO string=|%s| out_SI string=|%s|\n", + i, out_SO[i], out_SI[i]); + } + } /* end for */ + + i = 0; + while (getnblkline(tabl, 1) > 0) { + if((inp_data[i].set = getnumber(tabl)) < 0) { /* get inp set number */ + tablerr(10, "Set number for input sequences is wrong"); + } + if(((k = inp_data[i].set) > n_inp_sets) || (k < 0) ) { + tablerr(10,"Input set number for a sequence wrong"); + } + curst1 = chknblk(tabl); /* check what type of string follows */ + if(curst1 == strstart) { + mode1 = 1; + curend1 = strend; + } + else if(curst1 == liststart) { + mode1 = 2; + curend1 = listend; + } + else if(curst1 == regexstart) { + mode1 = 3; + curend1 = regexend; + } + else { + tablerr(10, "Delimiter wrong when reading input sequences"); + } + /* get input sequence */ + if((scr1pt = getstring(curst1, curend1, tabl)) == (char*)NULL) { + tablerr(10, "Error reading input sequence"); + } + scr1pt = savestring(scr1pt); /* Save the string */ + + if((out_data[i].set = getnumber(tabl)) < -3) { /* get inp set number */ + tablerr(10, "Wrong code for the output set number"); + } + + if(out_data[i].set > n_out_sets) { + tablerr(10, "Output set number for a sequence is wrong"); + } + + curst2 = chknblk(tabl); /* check what type of string follows */ + if(curst2 == strstart) { + mode2 = 1; + curend2 = strend; + } + else if(curst2 == liststart) { + mode2 = 2; + curend2 = listend; + } + else if(curst2 == regexstart) { + mode2 = 3; + curend2 = regexend; + } + else { + tablerr(10, "Delimiter wrong when reading sequences"); + } + + if((scr2pt = getstring(curst2, curend2, tabl)) == (char*)NULL) { + tablerr(10, "Error reading input sequence"); + } + scr2pt = savestring(scr2pt); + + /* check if acceptable types for sequences */ + if((mode2 == 3) && (mode1 != 3)) { /* no regular expressions for output */ + tablerr(10, + "Regular expression as output sequence and input not a regular expression"); + } + else if((mode1 == 1) && (mode2 == 2)) { /* inp string, out list */ + tablerr(10, "You specified list for output and string for input"); + } + else if((mode1 == 3) && (mode2 == 2)) { /* inp regex, out list */ + tablerr(10, "You specified string for input and list for output"); + } + else if((mode1 == 2) && (out_data[i].set < 0)) { + tablerr(10, + "Input LIST and output set code -1/-2/-3 is not supported at this moment"); + } + + if(mode1 == 2) { /* if list for input expression */ + /* split string at - sign */ + splitlist(scr1pt, scr1); + if(mode2 == 2) { + splitlist(scr2pt, scr2); + if(strlen(scr1) != strlen(scr2)) { + tablerr(10, + "The number of codes in the input and output list is different"); + } + } + } /* end mode 2 */ + else { /* for all other modes, convert the codes */ + convstr(scr1pt, scr1a); /* convert codes in input string */ + } + + if((mode1 == 1) && (strlen(scr1a) == 1)) { /* single inp char */ + /* it is like list with a single character, so cheat */ + if(out_data[i].set >= 0) { + mode1 = 2; + strcpy(scr1, scr1a); /* make it a list */ + } + else { + tablerr(10, + "One-character input strings and output codes -1/-2/-3 are not supported\n"); + } + } + + if(mode1 == 2) { /* fill the lists for mode 2 */ + if(mode2 == 1) { /* if normal string as output sequence */ + convstr(scr2pt, scr2); + scr2pt = savestring(scr2); + } + else { /* if mode2 = 2 */ + scr2pt = scr2; + } + /* now fill the maps */ + k = inp_data[i].set; + l = out_data[i].set; + scr1pt = scr1; /* points at input list */ + scr2ptr = scr2pt; /* points at output list or string */ + while (*scr1pt != '\0') { + if(mode2 == 2) { /* prepare string with code */ + scr1a[0] = *scr2ptr++; + scr1a[1] = '\0'; + scr2pt = savestring(scr1a); + } + ch = intcode(*scr1pt); + if((*inp_maps[k])[ch] != (char *)NULL) { + fprintf(stderr, +"You have entered the character |%c| with code \\0d%d for input set %d\n", + charcode(ch), ch, k); + tablerr(10, "Delete previous references if not needed"); + } + + (*inp_maps[k])[ch] = scr2pt; /* save output sequence */ + (*out_sets[k])[ch] = l; /* save output set number */ + scr1pt++; /* next code for output */ + } + i--; /* do not save this line in inp_str and out */ + } /* end if mode1 = 2*/ + else if(mode1 == 1) { /* if multicharacter input string */ + scr1pt = savestring(scr1a); + convstr(scr2pt, scr2a); + scr2pt = savestring(scr2a); + inp_data[i].typ = 0; + inp_data[i].len = strlen(scr1pt); + (inp_data[i].ad).seq = scr1pt; + out_data[i].typ = 0; + out_data[i].len = strlen(scr2pt); + (out_data[i].ad).seq = scr2pt; + } + else if(mode1 == 3) { /* if regular expression for input */ + inp_data[i].typ = 1; + l = strlen(scr1a); /* length of converted input expression */ + if(scr1a[0] == '^') { + tablerr(10, + "The ^ (beginning anchor) is not supported"); + } + if((scr1a[l-1] == '$') && (scr1a[l-1] != '\\')) { + tablerr(10, "The $ (end anchor) is not supported"); + } + + strcpy(regerrstr, "Error in input regular expression sequence: "); + + if((regauxptr = reg_comp(scr1a)) == NULL) { + tablerr(10, "Error in the input regular expression sequence"); + } + (inp_data[i].ad).re = regauxptr; + convstr(scr2pt, scr1a); /* convert codes in out string */ + scr2pt = savestring(scr1a); + if(mode2 == 3) { /* mark type of expression plan(0)/substit string(2) */ + out_data[i].typ = 2; + } + else { + out_data[i].typ = 0; + } + out_data[i].len = strlen(scr2pt); + (out_data[i].ad).seq = scr2pt; + } + + /* advance pointers */ + + n_conv_seq = ++i; + if(n_conv_seq >= (MAXPAIRS-1)) { + tablerr(10, + "Too many transliteration sequences. Recompile program with larger MAXPAIRS"); + } + } /* end while getnblkline */ + + if(debug_flg == 1) { + fprintf(stderr,"Multicharacter input sequences \n"); + for(i=0; i < n_conv_seq; i++) { + fprintf(stderr,"%2d) inp.type=%2d inp.set=%2d out.type=%2d out.set=%2d\n", + i, inp_data[i].typ, inp_data[i].set, out_data[i].typ, out_data[i].set); + if(inp_data[i].typ == 0) { + fprintf(stderr," Inp.str=|%s| ", (inp_data[i].ad).seq); + } + fprintf(stderr, "Out.str=|%s|\n", (out_data[i].ad).seq); + } + fprintf(stderr, + "input_set charcode input_character --> output_set output_string/\n"); + for(i = 0; i <= n_inp_sets; i++) { + for(k = 0; k < 256; k++) { + if((*inp_maps[i])[k] != (char *)NULL) { + fprintf(stderr," %2d \\%04o %c --> %2d %s\n", + i, k, charcode(k), (*out_sets[i])[k], (*inp_maps[i])[k]); + } + } + } + } + + + fprintf(outf,"%s",begseq); /* output starting sequence */ + + /* transliterate input file to output file */ + + level = 0; + if(n_inp_sets > 0) { + cur_inp_set = 1; + } + else { + cur_inp_set = 0; + } + inp_cur_set[level] = cur_inp_set; /* 1st input set is a default */ + inp_cur_nest[level] = 0; + scr1ptr = scr1a; + scr1ptr[0] = '\0'; + scr2ptr = scr2a; + scr2ptr[0] = '\0'; + scrcurptr = scr2ptr; + chars_left = 0; + buffer_size = MAXBUFF/2; /* will be set to 0 if EOF */ + out_cur_set = 1; /* no output set yet */ + + + while ( buffer_size > 0) { + /* swap input buffer pointers */ + scrauxptr = scr2ptr; + scr2ptr = scr1ptr; + scr1ptr = scrauxptr; + + scrauxptr = scrcurptr; /* old buffer last pointer */ + scrcurptr = scr1ptr; /* new buffer start */ + + /* copy remains of old buffer to new one */ + strcpy(scrcurptr, scrauxptr); + + l = chars_left; + for(i = 0; i < buffer_size; i++) { /* append input chars to scr1a */ + if((k = fgetc(inpf)) == EOF) { + buffer_size = 0; /* end of file */ + break; + } + else if(k == '\0') { /* skip zero characters */ + i--; + continue; + } + else { /* if normal character */ + *(scrcurptr + l++) = k; + } + } + *(scrcurptr + l) = '\0'; /* terminate buffer with 0 */ + chars_left = l; ; /* length of combined string */ + if(buffer_size == 0) { /* if EOF */ + chars_left += MAXMATCH+1; /* fool the program that there is more */ + } + + while (chars_left > MAXMATCH) { + /* check if end of scrcurptr --- it means end of input file, since only + then it can get to the end of the string, otherwise it stops + MAXMATCH before */ + if(*scrcurptr == '\0') { /* end of file */ + if(n_out_sets > 0) { /* if multiple output sets */ + l = out_SI_len[out_cur_set - 1]; + for(i = 0; i < l; i++) { + k = out_SI[out_cur_set-1][i]; + fputc(k, outf); + } + break; + } + } + +Backstep2: + + /* check if SHIFT IN sequence for current input set */ + if(n_inp_sets > 0) { + /* check SI sequence only when nesting count is 0 */ + if(inp_cur_nest[level] == 0) { + if(match_subs(&inp_SI_data[cur_inp_set-1], + &inp_SO_subs[cur_inp_set-1]) > 0) { /* is SI */ + repl_inp(); + level--; + if(level < 0) { + level = 0; + fprintf(stderr, +"More SHIFT_IN sequences than corresponding SHIFT_OUT sequences in text\n"); + } + cur_inp_set = inp_cur_set[level]; /* set previous inp set number */ + continue; + } + } + } + + /* check if new set of input chars started */ + l = -1; + for (i = 0; i < n_inp_sets; i++) { + if(match_subs(&inp_SO_data[i], &inp_SO_subs[i]) > 0) { + l = i; + break; + } + } + if(l >= 0) { /* is SO matched */ + repl_inp(); /* substitute SO_data with SO_seqs */ + if((inp_SI_data[l].len > 0) || (inp_SI_data[l].typ == 1)){ + /* increase level only is SHIFT IN present */ + level++; /* increase number of "opened" input sets */ + inp_cur_nest[level] = 0; /* It is new level,zero nesting sequences */ + if(level > MAXLEVEL) { + fprintf(stderr, + "Too many nested input character sets in input file\n"); + exit(39); + } + } + l++; /* sets in arrays are saved starting from 0, + i.e., set nr 1 corresponds to element [0], 2 --> [1], etc. */ + inp_cur_set[level] = l; /* save set number at current nesting level */ + cur_inp_set = l; + continue; + } + + /* Now check if the input sequence corresponding to cur_inp_set + matches the string */ + +Backstep1: /* if output set number is -2, start again */ + flg = -1; + for(i = 0; i < n_conv_seq; i++) { + k = inp_data[i].set; /*get set number for current transliteration seq */ + if((k == cur_inp_set) || (k == 0)) { /* if equal to current or 0 */ + if(match_subs(&inp_data[i], &out_data[i]) > 0) { + if(out_set_number < 0) { /* if backsteping */ + repl_inp(); /* replace */ + if (out_set_number == -1) { + flg = -1; + } + else if (out_set_number == -2) { + goto Backstep1; + } + else if (out_set_number == -3) { + goto Backstep2; + } + } + else { /* if set number >= 0 */ + flg = i; + break; + } + } + } + } + + if(flg < 0) { /* if no matching input multichar sequence found */ + ch = intcode(*scrcurptr); /* current input character */ + if((out_seq_ptr = (*inp_maps[cur_inp_set])[ch]) != NULL) { + /* if out_seq exists for current input set */ + out_set_number = (*out_sets[cur_inp_set])[ch]; + flg = 1; + } + else if((out_seq_ptr = (*inp_maps[0])[ch]) != NULL) { + /* if out_seq exitst for set number 0 */ + flg = 1; + out_set_number = (*out_sets[0])[ch]; + } + if(flg >= 0) { /* set other things */ + out_seq_length = strlen(out_seq_ptr); + inp_seq_length = 1; + } + } + + if(flg < 0) { /* if no match found, copy the input char to output */ + scr1[0] = *scrcurptr; + scr1[1] = '\0'; + if(*scrcurptr != '\0') { + out_seq_length = 1; + } + else { + out_seq_length = 0; + } + + inp_seq_length = 1; + out_set_number = 0; + out_seq_ptr = scr1; + } + + /* At this point all matches and substitutuions have been done */ + + /* check if nesting sequences found for a given set and increase or + decrease nesting if needed */ + if((n_inp_sets > 0) && (out_cur_set > 0)) { + for(i = 0; i < inp_seq_length; i++) { + if(chkseqs(1, &inp_nest_close[cur_inp_set-1], scrcurptr+i) >= 0) { + inp_cur_nest[level]--; + } + if(chkseqs(1, &inp_nest_open[cur_inp_set-1], scrcurptr+i) >= 0) { + inp_cur_nest[level]++; + } + } + } + + /* output the SI/SO sequences if output set changed */ + if((n_out_sets > 0) && + (out_set_number > 0)) { /* check if multiple output sets */ + if(out_cur_set != out_set_number) { /* if new set starts */ + if(out_cur_set > 0) { /* put SHIFT IN for a previous set */ + l = out_SI_len[out_cur_set-1]; /* old SHIFT IN seq length */ + for(i = 0; i < l; i++) { /* output old SHIFT IN */ + k = out_SI[out_cur_set-1][i]; + fputc(k, outf); + } + } + out_cur_set = out_set_number; /* make it current now */ + if(out_cur_set > 0) { + l = out_SO_len[out_cur_set-1]; /* length of SHIFT OUT sequence */ + for(i = 0; i < l; i++) { /* output SHIFT OUT seq for this set */ + k = out_SO[out_cur_set-1][i]; + fputc(k, outf); + } + } + } /* end out_set changes */ + } /* if multiple output sets specified */ + + /* now output the corresponding sequence */ + for(i = 0; i < out_seq_length; i++) { + k = *(out_seq_ptr+i); + fputc(k,outf); + } + + /* move past processed input text */ + scrcurptr += inp_seq_length; + chars_left -= inp_seq_length; + + + } /* while scanning input characters */ + + } /* end while reading input file */ + fprintf(outf,"%s",endseq); /* output ending sequence */ + fclose(inpf); + fclose(outf); + exit(0); +} + diff --git a/support/translit/translit.ps b/support/translit/translit.ps new file mode 100644 index 0000000000..07cc517407 --- /dev/null +++ b/support/translit/translit.ps @@ -0,0 +1,3524 @@ +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) +%%EndComments +%ident "@(#)lp:filter/postscript/postscript/dpost.ps 1.1" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def +%%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup +%%Page: 1 1 +save +mark +1 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +9 B f +(NAME)720 960 w +10 I f +(TRANSLIT)1080 1080 w +10 R f +( character)1 408(Program to transliterate texts in different character sets. The program converts input)11 3552 2 1440 1200 t +( codes \(or sequences of)4 1030(codes \(or sequences of codes\) to a different set of output character)11 2930 2 1440 1320 t +( with Latin)2 471(codes\). Intended for transliteration to/from phonetic representation of foreign letters)9 3489 2 1440 1440 t +( supports simple matches, charac-)4 1394( It)1 130( for these letters.)3 698(letters from/to special national codes used)5 1738 4 1440 1560 t +( transliteration schemes are easily)4 1391(ter lists and \257exible matches via regular expressions. The new)9 2569 2 1440 1680 t +( supported for input)3 845(added by creating simple transliteration tables. Multiple character sets are)9 3115 2 1440 1800 t +(and output. It does not yet support UNICODE, but some day it will.)12 2809 1 1440 1920 t +9 B f +(COPYRIGHT)720 2208 w +10 R f +(Copyright \(c\) 1993 Jan Labanowski and JKL Enterprises, Inc.)8 2543 1 1080 2328 t +( may distribute the modi\256ed)4 1236( You)1 257( a complete set of \256les.)5 1056(You may distribute the Software only as)6 1771 4 1080 2448 t +( you retain the Copyright notice and you do not delete original code, data, documenta-)14 3641(Software only if)2 679 2 1080 2568 t +( not sell the software or incorporate it)7 1591( may)1 209( You)1 242( Software is copyrighted.)3 1040( The)1 225(tion and associated \256les.)3 1013 6 1080 2688 t +( or JKL Enterprises, Inc.)4 1069(in the commercial product without written permission from Jan Labanowski)9 3251 2 1080 2808 t +(You are allowed to charge for media and copying if you distribute the whole unaltered package.)15 3950 1 1080 2928 t +9 B f +(SYNOPSIS)720 3216 w +10 B f +(translit)1080 3336 w +10 R f +([)1424 3336 w +10 B f +(-i)1490 3336 w +10 I f +(inp\256le)1584 3336 w +10 R f +(][)1867 3336 w +10 B f +(-o)1966 3336 w +10 I f +(out\256le)2082 3336 w +10 R f +(][)2365 3336 w +10 B f +(-d)2464 3336 w +10 R f +(][)2586 3336 w +10 B f +(-t)2685 3336 w +10 I f +(transtbl)2784 3336 w +10 S f +(\372)3161 3336 w +10 I f +(transtbl)3276 3336 w +10 R f +(])3621 3336 w +9 B f +(OPTIONS)720 3624 w +10 B f +(-i)1080 3744 w +10 I f +(inp\256le)1174 3744 w +(inp\256le)1440 3864 w +10 R f +( If)1 145( transliterated.)1 592(is a name of input \256le to be)7 1231 3 1735 3864 t +10 S1 f +(")3749 3864 w +10 B f +(-i)3790 3864 w +10 S1 f +(")3851 3864 w +10 R f +(is not speci\256ed, the input is taken)6 1462 1 3938 3864 t +(from standard input.)2 829 1 1440 3984 t +10 B f +(-o)1080 4152 w +10 I f +(out\256le)1196 4152 w +(out\256le)1440 4272 w +10 R f +(is an output \256le, where the transliterated text is stored. If)10 2388 1 1728 4272 t +10 S1 f +(")4154 4272 w +10 B f +(-o)4195 4272 w +10 S1 f +(")4278 4272 w +10 R f +(is not speci\256ed, the out-)4 1010 1 4390 4272 t +(put is directed to the standard output. Program will not overwrite the existing \256le. If \256le exists,)16 3960 1 1440 4392 t +(you need to delete it \256rst.)5 1056 1 1440 4512 t +10 B f +(-d)1080 4680 w +10 R f +( \256le are sent to standard)5 1071(Some information on character codes read from transliteration table)8 2889 2 1440 4680 t +(error \()1 259 1 1440 4800 t +10 S1 f +(")1699 4800 w +10 I f +(stderr)1740 4800 w +10 S1 f +(")1979 4800 w +10 R f +(\). Useful when developing new transliteration tables.)6 2161 1 2020 4800 t +10 B f +(-t)1080 4968 w +10 I f +(transtbl)1179 4968 w +(transtbl)1440 5088 w +10 R f +( transliteration table \256le which you want to use. The)9 2198(is a)1 148 2 1789 5088 t +10 S1 f +(")4173 5088 w +10 B f +(-t)4214 5088 w +10 S1 f +(")4280 5088 w +10 R f +(option may be omitted if)4 1041 1 4359 5088 t +(the)1440 5208 w +10 I f +(transtbl)1604 5208 w +10 R f +(is speci\256ed as the last parameter on the command line. The program \256rst tries to)14 3442 1 1958 5208 t +(locate)1440 5328 w +10 I f +(transtbl)1715 5328 w +10 R f +( not found, it searches the directory chosen at)8 1914(\256le in the current directory, and if)6 1422 2 2064 5328 t +(compilation/installation time in)2 1331 1 1440 5448 t +10 S1 f +(")2833 5448 w +10 I f +(paths.h)2874 5448 w +10 S1 f +(")3166 5448 w +10 R f +(. If no)2 315 1 3207 5448 t +10 S1 f +(")3583 5448 w +10 I f +(transtbl)3624 5448 w +10 S1 f +(")3936 5448 w +10 R f +(is given, the default \256le name)5 1362 1 4038 5448 t +(speci\256ed in)1 468 1 1440 5568 t +10 S1 f +(")1943 5568 w +10 I f +(paths.h)1984 5568 w +10 S1 f +(")2276 5568 w +10 R f +(is taken. The compile/installation time defaults in)6 2040 1 2352 5568 t +10 S1 f +(")4427 5568 w +10 I f +(paths.h)4468 5568 w +10 S1 f +(")4760 5568 w +10 R f +(for the search)2 564 1 4836 5568 t +( overiden by setting environment variables: TRANSP)6 2215(directory and the default \256le name can be)7 1745 2 1440 5688 t +(and TRANSF, respectively \(see below\).)4 1629 1 1440 5808 t +9 B f +(ENVIRONMENT VARIABLES)1 1265 1 720 6096 t +10 R f +( tables can be overiden by setting environment)7 1994(The default path to the directory holding transliteration)7 2326 2 1080 6216 t +( table can be overiden by setting TRANSF)7 1834(variable TRANSP. The default name for the transliteration)7 2486 2 1080 6336 t +( transliteration \256le is given on the command line, it will)10 2525(environment variable. However, when the)4 1795 2 1080 6456 t +( environment variables)2 939( are some examples of setting)5 1249( Here)1 264(overide the defaults and environment setting.)5 1868 4 1080 6576 t +(for different operating systems:)3 1280 1 1080 6696 t +10 I f +(UN)1280 6936 w +10 S f +(*)1419 6936 w +10 I f +(X System)1 371 1 1469 6936 t +10 R f +(If you are using)3 653 1 1346 7056 t +10 I f +(csh)2032 7056 w +10 R f +(\(C-shell\):)2198 7056 w +(setenv TRANSP /home/john/translit/)2 1495 1 1511 7176 t +(setenv TRANSF koi8-tex.rus)2 1185 1 1511 7296 t +( 1)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7776 t +cleartomark +showpage +restore +%%EndPage: 1 1 +%%Page: 2 2 +save +mark +2 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(If you are using)3 653 1 1346 960 t +10 I f +(sh)2032 960 w +10 R f +(\(Bourne Shell\):)1 627 1 2154 960 t +(set TRANSP=/home/john/translit/)1 1374 1 1511 1080 t +(export TRANSP)1 672 1 1511 1200 t +(set TRANSF=koi8-tex.rus)1 1064 1 1511 1320 t +(export TRANSF)1 672 1 1511 1440 t +10 I f +(VAX-VMS System)1 720 1 1280 1560 t +10 R f +(TRANSP:==SYS$USER:[JOHN.TRANSLIT])1511 1680 w +(TRANSF:==KOI8-TEX.TBL)1511 1800 w +10 I f +(PC-DOS or MS-DOS)2 870 1 1280 1920 t +10 R f +(SET TRANSP=C:)1 746 1 1511 2040 t +10 S1 f +(\\)2273 2040 w +10 R f +(JOHN)2317 2040 w +10 S1 f +(\\)2588 2040 w +10 R f +(TRANSLIT)2632 2040 w +10 S1 f +(\\)3131 2040 w +10 R f +(SET TRANSF=KOI8-TEX.TBL)1 1319 1 1511 2160 t +(Note that the directory path has to include concluding slashes,)9 2552 1 1080 2280 t +10 S1 f +(\\)3681 2280 w +10 R f +( .)1 57(or /)1 160 2 3758 2280 t +9 B f +(EXAMPLES)720 2688 w +10 R f +(cat text.koi8)1 502 1 1580 2808 t +10 S f +(\372)2147 2808 w +10 R f +(translit koi8-tex.rus)1 791 1 2262 2808 t +10 S1 f +(>)3086 2808 w +10 R f +(text.tex)3175 2808 w +(in UN)1 255 1 1080 2928 t +10 S f +(*)1335 2928 w +10 R f +(X is equivalent to:)3 760 1 1385 2928 t +(translit -t koi8-tex.rus -o text.tex -i text.koi8)6 1811 1 1580 3168 t +(and converts \256le text.koi8 to \256le text.tex using transliteration speci\256ed in the \256le koi8-tex.rus.)13 3855 1 1080 3288 t +(translit -i text.koi8 koi8-cl.rus)3 1221 1 1580 3528 t +( converted text from \256le text.koi8 on your terminal. The conversion table is koi8-cl.rus)13 3819(displays the)1 501 2 1080 3648 t +(\(KOI8 --)1 359 1 1080 3768 t +10 S1 f +(>)1439 3768 w +10 R f +(Library of Congress\).)2 878 1 1528 3768 t +(translit -i text.alt -t alt-koi8.rus)4 1265 1 1580 4008 t +10 S f +(\372)2910 4008 w +10 R f +(translit -o text.tex -t koi8-tex.rus)4 1331 1 3025 4008 t +(is essentially equivalent to the following two commands in UN)9 2596 1 1080 4128 t +10 S f +(*)3676 4128 w +10 R f +(X or MS-DOS:)2 627 1 3726 4128 t +(translit -i text.alt -o junk\256le -t alt-koi8.rus)6 1720 1 1580 4248 t +(translit -i junk\256le -o text.tex -t koi8-ltx.rus)6 1748 1 1580 4368 t +(and converts the \256le in ALT character set to a LaTeX \256le for printing.)13 2898 1 1080 4488 t +(translit -i russ.txt pho-koi8.rus)3 1238 1 1580 4728 t +10 S f +(\372)2883 4728 w +10 R f +(translit -o russ.tex koi8-ltx.rus)3 1232 1 2998 4728 t +(converts \256le russ.txt from phonetic transliteration to LaTeX \256le russ.tex for printing.)11 3468 1 1080 4848 t +9 B f +(TRANSLITERATION TABLES)1 1280 1 720 5376 t +10 R f +( available with the current distribution. Consult the comments in)9 2757(The following transliteration \256les are)4 1563 2 1080 5496 t +(the individual \256les for details.)4 1229 1 1080 5616 t +10 I f +(koi8-tex.rus)1080 5784 w +10 R f +( news)1 247(Conversion table which changes the \256le in KOI8 \(8 bit character set used by RELCOM)14 3713 2 1440 5904 t +(service\) to a Plain TeX \256le for printing with)8 1823 1 1440 6024 t +10 I f +(AMS)3296 6024 w +10 R f +(WNCYR fonts.)1 630 1 3523 6024 t +10 I f +(koi8-ltx.rus)1080 6192 w +10 R f +( news)1 247(Conversion table which changes the \256le in KOI8 \(8 bit character set used by RELCOM)14 3713 2 1440 6312 t +(service\) to LaTeX \256le for printing with)6 1612 1 1440 6432 t +10 I f +(AMS)3085 6432 w +10 R f +(WNCYR fonts.)1 630 1 3312 6432 t +10 I f +(ltx-koi8.rus)1080 6600 w +10 R f +( it will not handle complicated)5 1304(Conversion table for the LaTeX to KOI8 conversion. Note that)9 2656 2 1440 6720 t +( to the characters.)3 736( source)1 329( and only TeX can convert a LaTeX)7 1514(cases, since LaTeX is a program,)5 1381 4 1440 6840 t +( work OK for simple cases of text only \256les, and may need some editing for)15 3179(However, it should)2 781 2 1440 6960 t +(complicated cases.)1 756 1 1440 7080 t +10 I f +(k8-tavtt.rus)1080 7248 w +10 R f +( 2)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7728 t +cleartomark +showpage +restore +%%EndPage: 2 2 +%%Page: 3 3 +save +mark +3 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(Converts KOI8 to Bill Tavolga cyrttf truetype font mapping.)8 2487 1 1440 960 t +10 I f +(hex-text.rus)1080 1128 w +10 R f +( convert characters with codes larger)5 1534(Converts hexcodes to actual codes. Some e-mail programs)7 2426 2 1440 1248 t +( table converts hexadecimal)3 1225( This)1 274(than 127 to hexadecimal numbers like =AB, =9C, etc.)8 2461 3 1440 1368 t +(numbers back to codes.)3 961 1 1440 1488 t +10 I f +(alt-gos.rus)1080 1656 w +10 R f +( ALT \(Bryabrins alternativnyj variant used)5 1781(This is a transliteration data \256le for converting from)8 2179 2 1440 1776 t +(in many popular wordprocessors\) to GOSTSCII 84 \(approx. ISO-8859-5?\))8 3045 1 1440 1896 t +10 I f +(alt-koi8.rus)1080 2064 w +10 R f +( to be)2 276( is meant)2 413( KOI8)1 311(This is a transliteration data \256le for converting from ALT to KOI8.)11 2960 4 1440 2184 t +(GOST 19768-74 \(as used by RELCOM\).)5 1683 1 1440 2304 t +10 I f +(gos-alt.rus)1080 2472 w +10 R f +( \256le for converting GOSTSCII 84 \(approx. ISO-8859-5?\) to ALT)9 2778(This is a transliteration data)4 1182 2 1440 2592 t +(\(Bryabrins alternativnyj variant\))2 1308 1 1440 2712 t +10 I f +(gos-koi8.rus)1080 2880 w +10 R f +( to KOI8)2 389(This is a transliteration data \256le for converting GOSTSCII 84 \(approx. ISO-8859-5?\))11 3571 2 1440 3000 t +(used by RELCOM KOI8 is meant to be GOST 19768-74)9 2351 1 1440 3120 t +10 I f +(koi8-alt.rus)1080 3288 w +10 R f +( meant to be GOST)4 901( is)1 122( KOI8)1 315(This is a transliteration data \256le for converting from KOI8.)9 2622 4 1440 3408 t +(19768-74, to ALT \(Bryabrins alternativnyj variant\))5 2087 1 1440 3528 t +10 I f +(koi8-gos.rus)1080 3696 w +10 R f +( is meant to be)4 675( KOI8)1 308( from KOI8 \(Relcom\).)3 967(This is a transliteration data \256le for converting)7 2010 4 1440 3816 t +(GOST 19768-74, to GOSTSCII 84 \(approx. ISO-8859-5\))6 2340 1 1440 3936 t +10 I f +(koi8-7.rus)1080 4104 w +10 R f +(This \256le converts from KOI8 to KOI7.)6 1593 1 1440 4224 t +10 I f +(koi7-8.rus)1080 4392 w +10 R f +( Before you attempt the conversion, you might need to)9 2325(This \256le converts from KOI7 to KOI8.)6 1635 2 1440 4512 t +( \256le. You MUST read the comments in)7 1693(perform a simple edit on your)5 1290 2 1440 4632 t +10 I f +(koi7-8.rus)4500 4632 w +10 R f +(before you)1 448 1 4952 4632 t +(attempt this conversion.)2 974 1 1440 4752 t +10 I f +(koi7nl-8.rus)1080 4920 w +10 R f +( in the input \256le. If you have)7 1285(This \256le assumes that there are only Russian letters \(no Latin\))10 2675 2 1440 5040 t +(Latin letters, and you inserted SHIFT-OUT/IN characters, use \256le)8 2692 1 1440 5160 t +10 I f +(koi7-8.rus)4165 5160 w +10 R f +(.)4573 5160 w +10 I f +(koi8-lc.rus)1080 5328 w +10 R f +( extensions are added.)3 905( Some)1 294(This \256le converts KOI8 to the Library of Congress transliteration.)9 2702 3 1440 5448 t +10 I f +(koi8-php.rus)1080 5616 w +10 R f +(This \256le converts KOI8 to the Pokrovsky transliteration.)7 2310 1 1440 5736 t +10 I f +(php-koi8.rus)1080 5904 w +10 R f +(This \256le converts from Pokrovsky transliteration to KOI8.)7 2382 1 1440 6024 t +10 I f +(koi8-phg.rus)1080 6192 w +10 R f +(This \256le converts from KOI8 to GOST transliteration.)7 2215 1 1440 6312 t +10 I f +(phg-koi8.rus)1080 6480 w +10 R f +(This \256le converts from GOST transliteration to KOI8.)7 2215 1 1440 6600 t +10 I f +(pho-koi8.rus)1080 6768 w +10 R f +(This is a table which will convert from many)8 1910 1 1440 6888 t +10 S1 f +(")3389 6888 w +10 R f +(phonetic)3430 6888 w +10 S1 f +(")3774 6888 w +10 R f +(transliteration schemes to KOI8. It is)5 1546 1 3854 6888 t +( it takes a lot of time to transliterate the \256le using this table. Some transliterations)15 3414(elaborate and)1 546 2 1440 7008 t +( You)1 246( be bug free.)3 546(are hopeless and internally inconsistent \(as humans...\), so the results cannot)10 3168 3 1440 7128 t +( than those assumed in)4 937(might want to modify the \256le, if your transliteration patterns are different)11 3023 2 1440 7248 t +( 3)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7728 t +cleartomark +showpage +restore +%%EndPage: 3 3 +%%Page: 4 4 +save +mark +4 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +( convert-)1 370(this \256le. You may also want to simplify this \256le if the phonetic transliteration you are)15 3590 2 1440 960 t +( c and t-s, h for)5 649(ing is a sound one \(most are not, e.g., they use e for je and e oborotnoye, ts for)18 3311 2 1440 1080 t +(kha, i for i-kratkoe, etc.\).)4 1029 1 1440 1200 t +9 B f +(INTRODUCTION)720 1608 w +10 R f +( description and go)3 841(If you do not intend to write your own transliteration tables, you may skip this)14 3479 2 1080 1728 t +( want to read this material)5 1200(directly to the installation and copyright sections. However, you might)9 3120 2 1080 1848 t +( is frequently necessary to)4 1106( It)1 135( transliteration.)1 621(anyhow, to better understand the traps and complexities of)8 2458 4 1080 1968 t +( set of characters \(or composite characters, phonemes, etc.\) to)9 2738(transliterate text, i.e., to change one)5 1582 2 1080 2088 t +(another set.)1 468 1 1080 2208 t +( the input \256le in some character set to)8 1610(On computers, the transliteration operation consists of converting)7 2710 2 1080 2376 t +(the output \256le in another character set.)6 1581 1 1080 2496 t +( transliterated, i.e, their codes are changed according to)8 2378(In the simplest case, the single characters are)7 1942 2 1080 2664 t +( mapping, the task can)4 944(some transliteration table. This is called remapping and, assuming the one-to-one)10 3376 2 1080 2784 t +(be accomplished by a simple pseudo program:)6 1901 1 1080 2904 t +(new)1580 3024 w +10 S f +(_)1746 3024 w +10 R f +(char)1796 3024 w +10 S f +(_)1967 3024 w +10 R f +(code = character)2 674 1 2017 3024 t +10 S f +(_)2691 3024 w +10 R f +(map[old)2741 3024 w +10 S f +(_)3074 3024 w +10 R f +(char)3124 3024 w +10 S f +(_)3295 3024 w +10 R f +(code];)3345 3024 w +( one set, but do not)5 831(If the one-to-one correspondence does not exist \(i.e., some codes may be present in)13 3489 2 1080 3192 t +( there are 3)3 472(have corresponding codes in another set\), precise transliteration is not possible. In such cases)13 3848 2 1080 3312 t +(obvious possibilities:)1 857 1 1080 3432 t +(1. skip characters which do not have counterparts,)7 2054 1 1580 3552 t +(2. retain unchanged codes of these characters,)6 1875 1 1580 3672 t +(3. convert the codes to multicharacter sequences.)6 2004 1 1580 3792 t +( than one character sets, e.g., the \256le can contain Latin charac-)11 2638(In some cases, the \256le can contain more)7 1682 2 1080 3912 t +( \(e.g. Russian text\). If the character codes assigned to char-)10 2447(ters \(e.g. English text\) and Cyrillic characters)6 1873 2 1080 4032 t +( not overlap, this is still a simple mapping problem. This is a case with KOI8)15 3269(acters in different sets do)4 1051 2 1080 4152 t +( Russian, which reserve the lower 127 codes for standard ASCII codes)11 2970(or GOSTCII character tables for)4 1350 2 1080 4272 t +(\(which include all Latin characters\) and characters with codes above 127 for Cyrillic letters.)13 3778 1 1080 4392 t +( of the)2 305(If character codes overlap, there is a SHIFT-OUT/SHIFT-IN technique in which the meaning)12 4015 2 1080 4560 t +( this case, the)3 568(character sequence is determined by an opening code \(or sequence of characters codes\). In)13 3752 2 1080 4680 t +( of characters is determined by the SHIFT-OUT character \(or sequence\) which pre-)12 3442(meaning of the series)3 878 2 1080 4800 t +( characters returns the)3 901(cedes them. The SHIFT-IN character \(or sequence\) following the series of)10 3056 2 1080 4920 t +10 S1 f +(")5070 4920 w +10 R f +(reader)5111 4920 w +10 S1 f +(")5359 4920 w +10 R f +( schemes are used:)3 769( To)1 177(to the default or previous status.)5 1322 3 1080 5040 t +(\(char)1580 5160 w +10 S f +(_)1784 5160 w +10 R f +(set)1834 5160 w +10 S f +(_)1945 5160 w +10 R f +(1\)\(SHIFT-IN[1]\)\(SHIFT-OUT[2]\)\(char)1995 5160 w +10 S f +(_)3578 5160 w +10 R f +(set)3628 5160 w +10 S f +(_)3739 5160 w +10 R f +(2\)...)3789 5160 w +(or)1080 5280 w +(\(char)1580 5400 w +10 S f +(_)1784 5400 w +10 R f +(set)1834 5400 w +10 S f +(_)1945 5400 w +10 R f +(1\)\(SHIFT-OUT[2]\)\(char)1995 5400 w +10 S f +(_)2980 5400 w +10 R f +(set)3030 5400 w +10 S f +(_)3141 5400 w +10 R f +(2\)\(SHIFT-OUT[1]\)char)3191 5400 w +10 S f +(_)4143 5400 w +10 R f +(set)4193 5400 w +10 S f +(_)4304 5400 w +10 R f +(1...)4354 5400 w +( most)1 232( by necessity language speci\256c \(the)5 1466( are)1 190(Since computer keyboards, screens, printers, software, etc.,)6 2432 4 1080 5640 t +( problem of typing foreign language text which contains letters different)10 2984(popular being ASCII\), there is a)5 1336 2 1080 5760 t +( letters to)2 410(than standard Latin alphabet. For this reason, many transliteration schemes use several Latin)12 3910 2 1080 5880 t +(represent a single letter of foreign alphabet, for example:)8 2333 1 1080 6000 t +(zh is used to represent cyrillic letter zhe,)7 1669 1 1080 6120 t +10 S1 f +(\\ ")1 85 1 2831 6120 t +10 R f +(o may be used to represent the o umlaut, etc.)9 1855 1 2916 6120 t +( another alphabet, it is also easy to process. How-)9 2130(If there is one-to-one mapping of such sequences to)8 2190 2 1080 6360 t +( a frequently used transliteration)4 1356(ever, it is necessary to substitute longest sequences \256rst. For example,)10 2964 2 1080 6480 t +(for cyrillic letters:)2 737 1 1080 6600 t +10 I f +(shch)1280 6720 w +10 R f +(--- letter)1 605 1 1780 6720 t +10 B f +(shcza)2418 6720 w +10 R f +(221 \(decimal KOI8 code\))3 1046 1 3480 6720 t +10 I f +(sh)1280 6840 w +10 R f +(--- letter)1 605 1 1780 6840 t +10 B f +(sha)2418 6840 w +10 R f +(219)3480 6840 w +10 I f +(ch)1280 6960 w +10 R f +(--- letter)1 605 1 1780 6960 t +10 B f +(cze)2418 6960 w +10 R f +(222)3480 6960 w +10 I f +(c)1280 7080 w +10 R f +(--- letter)1 605 1 1780 7080 t +10 B f +(tse)2418 7080 w +10 R f +(195)3480 7080 w +10 I f +(h)1280 7200 w +10 R f +(--- letter)1 605 1 1780 7200 t +10 B f +(kha)2418 7200 w +10 R f +(200)3480 7200 w +( 4)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 +%%Page: 5 5 +save +mark +5 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +10 I f +(a)1280 960 w +10 R f +(--- letter)1 605 1 1780 960 t +10 B f +(a)2418 960 w +10 R f +(193)3480 960 w +( should proceed \256rst with converting all)6 1665(Obviously, in this case, we)4 1121 2 1080 1128 t +10 I f +(shch)3903 1128 w +10 R f +(sequences to)1 519 1 4123 1128 t +10 B f +(shcha)4679 1128 w +10 R f +(letter, then)1 439 1 4961 1128 t +(two-character)1080 1248 w +10 I f +(sh)1663 1248 w +10 R f +(and)1788 1248 w +10 I f +(ch)1968 1248 w +10 R f +(, and then single character)4 1088 1 2062 1248 t +10 B f +(c)3185 1248 w +10 R f +(and)3264 1248 w +10 B f +(h)3443 1248 w +10 R f +( for the one-to-one transliteration,)4 1390(. Generally,)1 511 2 3499 1248 t +( and the order of conversion within sequences of the)9 2294(the longest sequences should be precessed \256rst,)6 2026 2 1080 1368 t +( example, converting the word)4 1273( For)1 211( makes no difference.)3 900(same length)1 495 4 1080 1488 t +10 S1 f +(")3998 1488 w +10 R f +(shchah)4039 1488 w +10 S1 f +(")4316 1488 w +10 R f +(to KOI8 should proceed)3 1004 1 4396 1488 t +(in a following way:)3 804 1 1080 1608 t +10 I f +(shchah)1280 1728 w +10 R f +(--)1596 1728 w +10 S1 f +(>)1662 1728 w +10 R f +(\(221\))1751 1728 w +10 I f +(ah)1967 1728 w +10 R f +(, \(221\))1 274 1 2067 1728 t +10 I f +(ah)2341 1728 w +10 R f +(--)2474 1728 w +10 S1 f +(>)2540 1728 w +10 R f +(\(221\)\(193\))2629 1728 w +10 I f +(h)3061 1728 w +10 R f +(, \(221\)\(193\))1 490 1 3111 1728 t +10 I f +(h)3601 1728 w +10 R f +(--)3717 1728 w +10 S1 f +(>)3783 1728 w +10 R f +(\(221\)\(193\)\(200\))3872 1728 w +( mind the fol-)3 580(There is a multitude of reasons why transliteration is done. I wrote this program having in)15 3740 2 1080 1848 t +(lowing ones:)1 522 1 1080 1968 t +(1\) to print cyrillic text using TeX/LaTeX and cyrillic fonts)9 2411 1 1280 2088 t +(2\) to read KOI8 encoded messages from Russia on my ASCII terminal.)11 2939 1 1280 2208 t +(However, I was trying to make it \257exible to accommodate other uses.)11 2864 1 1080 2328 t +9 B f +(PROGRAM OPERATION)1 1065 1 720 2616 t +10 R f +( to an output \256le using transliteration rules from the transliteration)10 2823(The program converts the input \256le)5 1497 2 1080 2736 t +( you specify with option)4 1068(rule \256le which)2 627 2 1080 2856 t +10 B f +(-t)2824 2856 w +10 R f +( examples of transliteration rule \256les are enclosed.)7 2175(. Some)1 335 2 2890 2856 t +(Before program can be used, the transliteration rules need to be speci\256ed.)11 3023 1 1080 2976 t +(These are given as a \256le which consist of the following parts described below:)13 3229 1 1080 3144 t +(1\) File format number \(it is 1 at this moment\))9 1891 1 1280 3264 t +(2\) Delimiters used to enclose a\) simple strings, b\) character lists, c\) regular expressions)13 3589 1 1280 3384 t +(3\) Starting sequence for output)4 1269 1 1280 3504 t +(4\) Ending sequence for output)4 1241 1 1280 3624 t +(5\) Number of input)3 798 1 1280 3744 t +10 S1 f +(")2111 3744 w +10 R f +(character sets)1 547 1 2152 3744 t +10 S1 f +(")2699 3744 w +10 R f +(6\) SHIFT-OUT/SHIFT-IN sequences for each input character set)7 2657 1 1280 3864 t +(7\) Number of output)3 848 1 1280 3984 t +10 S1 f +(")2161 3984 w +10 R f +(character sets)1 547 1 2202 3984 t +10 S1 f +(")2749 3984 w +10 R f +(8\) SHIFT-OUT/SHIFT-IN sequences for each output character set)7 2707 1 1280 4104 t +(9\) Transliteration table)2 931 1 1280 4224 t +10 I f +(GENERAL COMMENTS)1 1011 1 1080 4392 t +10 R f +( comments may be included in the \256le)7 1615( The)1 226( consists of comments and data.)5 1336(The transliteration rules \256le)3 1143 4 1080 4512 t +(as:)1080 4632 w +( starting with ! or)4 750(a\) line comments --- lines)4 1078 2 1380 4752 t +10 S1 f +(#)3247 4752 w +10 R f +(character \()1 436 1 3336 4752 t +10 S1 f +(#)3772 4752 w +10 R f +(or ! must be in the \256rst column of a)9 1539 1 3861 4752 t +(line\) are treated as comments and are not read in by the program.)12 2692 1 1580 4872 t +( one)1 187(b\) comments following all required entries on the line. They must be separated by at least)15 3833 2 1380 4992 t +( entry on the line and need not start with any particular character.)12 2806(space from the last data)4 1014 2 1580 5112 t +(These comments cannot be used within multiline sequences.)7 2470 1 1580 5232 t +( strings may represent:)3 931( The)1 221(The data entries consist of integer numbers and strings.)8 2269 3 1080 5400 t +(a\) plain strings)2 610 1 1280 5520 t +(b\) character lists)2 675 1 1280 5640 t +(c\) regular expressions)2 891 1 1280 5760 t +( in the \256le, are processed through the)7 1566(All strings which appear)3 1015 2 1080 5928 t +10 S1 f +(")3699 5928 w +10 R f +(string processor)1 648 1 3740 5928 t +10 S1 f +(")4388 5928 w +10 R f +(, which allows entering)3 971 1 4429 5928 t +( is speci\256ed as a backslash)5 1122( character code)2 628( The)1 226(unprintable characters as codes.)3 1307 4 1080 6048 t +10 S1 f +(" \\ ")2 142 1 4400 6048 t +10 R f +(followed by at least)3 821 1 4579 6048 t +(2 digit\(s\) \(i.e.,)2 617 1 1080 6168 t +10 S1 f +(\\)1762 6168 w +10 R f +(01 produces code=1, but)3 1054 1 1806 6168 t +10 S1 f +(\\)2941 6168 w +10 R f +(1 is passed unchanged\). The following formats are sup-)8 2415 1 2985 6168 t +(ported:)1080 6288 w +10 S1 f +(\\)1296 6408 w +10 R f +( of octal code 123 \(when leading zero present\))8 1914(0123 character)1 696 2 1340 6408 t +10 S1 f +(\\)1296 6528 w +10 R f +( of decimal code 123 \(when leading digit is not zero\))10 2193(123 character)1 679 2 1340 6528 t +10 S1 f +(\\)1296 6648 w +10 R f +(0o123 or)1 399 1 1340 6648 t +10 S1 f +(\\)1788 6648 w +10 R f +( of octal code 123)4 747(0O123 character)1 702 2 1832 6648 t +10 S1 f +(\\)1296 6768 w +10 R f +(0d123 or)1 399 1 1340 6768 t +10 S1 f +(\\)1788 6768 w +10 R f +( of decimal code 123)4 869(0D123 character)1 702 2 1832 6768 t +10 S1 f +(\\)1296 6888 w +10 R f +(0xA3 or)1 404 1 1340 6888 t +10 S1 f +(\\)1793 6888 w +10 R f +(0XA3 or)1 360 1 1837 6888 t +10 S1 f +(\\)2246 6888 w +10 R f +( of hexadecimal code A3)4 1029(0xa3 character)1 657 2 2290 6888 t +( are 0-7 for octal codes, 0-9 for decimal codes and 0-F \(and/or 0-f\) for hexadecimal)15 3548(The allowed digits)2 772 2 1080 7056 t +( a)1 78( a situation when code has to be followed by a digit character, you need to enter the digit as)19 3839(codes. In)1 403 3 1080 7176 t +(code. E.g., if you want character)5 1363 1 1080 7296 t +10 S1 f +(\\)2498 7296 w +10 R f +( as a code)3 435(0xA3 followed by a letter C, you need to specify letter C)11 2423 2 2542 7296 t +( 5)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7776 t +cleartomark +showpage +restore +%%EndPage: 5 5 +%%Page: 6 6 +save +mark +6 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(\()1080 960 w +10 S1 f +(\\)1129 960 w +10 R f +(0x43 or)1 321 1 1173 960 t +10 S1 f +(\\)1548 960 w +10 R f +(103 or)1 271 1 1592 960 t +10 S1 f +(\\)1917 960 w +10 R f +(0o103 or)1 371 1 1961 960 t +10 S1 f +(\\)2386 960 w +10 R f +( as, e.g.,)2 351(0d67\) and type the sequence)4 1188 2 2430 960 t +10 S1 f +(\\)4055 960 w +10 R f +(0xA3)4099 960 w +10 S1 f +(\\)4337 960 w +10 R f +( resulting)1 387(103. Character)1 632 2 4381 960 t +(in a code 0 \(zero\) \(e.g.,)5 1009 1 1080 1080 t +10 S1 f +(\\)2147 1080 w +10 R f +( tells:)1 238(00\) is special. It)3 689 2 2191 1080 t +10 S1 f +(")3194 1080 w +10 R f +(skip everything what follows me in this string)7 1962 1 3235 1080 t +10 S1 f +(")5197 1080 w +10 R f +(. It)1 162 1 5238 1080 t +( you can always terminate the sequence with a delimiter. When you)11 2821(does not make sense to use it, since)7 1499 2 1080 1200 t +( empty string as a matching sequence, remember that it does not match anything.)13 3336(use an)1 293 2 1080 1320 t +( the string is too long to \256t a)8 1225( If)1 136(If the line with entries is too long, you can break it between the \256elds.)14 2959 3 1080 1560 t +( it before any nonblank character by the)7 1671(line, you can break)3 798 2 1080 1680 t +10 S1 f +(\\)3602 1680 w +10 R f +(\(backslash\) followed by white space \(i.e.,)5 1717 1 3683 1680 t +(new lines, spaces, tabs, etc.\). The)5 1400 1 1080 1800 t +10 S1 f +(\\)2535 1800 w +10 R f +(and the following white space will be removed from the string by)11 2781 1 2619 1800 t +( preprocessor. However, you are not allowed to break the individual character codes \(and you)14 3930(the string)1 390 2 1080 1920 t +( example:)1 399( For)1 205(probably would not do it ever for aestetic purposes\).)8 2152 3 1080 2040 t +10 S1 f +(")1280 2160 w +10 R f +(experi)1321 2160 w +10 S1 f +(\\)1570 2160 w +10 R f +(mental design)1 566 1 1280 2280 t +10 S1 f +(")1846 2280 w +10 R f +(is equivalent to:)2 655 1 1080 2400 t +10 S1 f +(")1280 2520 w +10 R f +(experimental design)1 815 1 1321 2520 t +10 S1 f +(")2136 2520 w +10 R f +(while:)1080 2640 w +10 S1 f +(")1280 2760 w +10 R f +(experimental)1321 2760 w +10 S1 f +(\\)1842 2760 w +10 R f +(design)1280 2880 w +10 S1 f +(")1541 2880 w +10 R f +(is equivalent to:)2 655 1 1080 3000 t +10 S1 f +(")1280 3120 w +10 R f +(experimentaldesign)1321 3120 w +10 S1 f +(")2103 3120 w +10 R f +(If you need to have)4 802 1 1080 3240 t +10 S1 f +(\\)1931 3240 w +10 R f +( to enter either a backslash or a space)8 1556(followed by a space in your string, you need)8 1836 2 2008 3240 t +(following it as an explicit character code, for example:)8 2245 1 1080 3360 t +10 S1 f +( \\)1 60(" \\)1 85 2 1280 3480 t +10 R f +(0o40)1441 3480 w +10 S1 f +(")1641 3480 w +10 R f +(will produce a)2 587 1 1080 3600 t +10 S1 f +(\\)1716 3600 w +10 R f +(followed by the space, while the string:)6 1621 1 1793 3600 t +10 S1 f +( ")1 189(" \\)1 85 2 1280 3720 t +10 R f +(will be empty.)2 591 1 1080 3840 t +( lines.)1 253(The preprocessor knows only about comments, plain characters, character codes, and continuation)11 4067 2 1080 4080 t +( their combinations may have a special meaning in lists and regular)11 3007(However, some characters and)3 1313 2 1080 4200 t +(expressions.)1080 4320 w +10 I f +(DETAILS OF FILE STRUCTURE)3 1388 1 1080 4680 t +10 R f +( on a line by itself at the moment. This entry is)11 2119(Ad.1\) File format number. This is simply a digit 1)9 2201 2 1080 4968 t +( allow future extensions of the transliteration description \256le without the need to)12 3544(included to)1 476 2 1380 5088 t +( the current \256le for-)4 829(modify older transliteration descriptions \(program will read data according to)9 3191 2 1380 5208 t +(mat number given in the \256le\).)5 1228 1 1380 5328 t +( specify pairs of single character delimiters for 3 types of)10 2378(Ad.2\) String delimiters. The subsequent 3 lines)6 1942 2 1080 5568 t +( line format is:)3 610( The)1 221(text data.)1 374 3 1380 5688 t +(opening)1580 5808 w +10 S f +(_)1902 5808 w +10 R f +(character closing)1 785 1 1952 5808 t +10 S f +(_)2737 5808 w +10 R f +(character.)2787 5808 w +( string \(text)2 509( Each)1 281( of the text data.)4 742(These are needed to mark the beginning/end and the type)9 2488 4 1380 5928 t +( delimiter, and ends at the last char-)7 1488(datum\) is saved starting from the \256rst character after opening)9 2532 2 1380 6048 t +( closing delimiter. If you need to use the closing delimiter within a string, you)14 3367(acter before the)2 653 2 1380 6168 t +(need to specify it as its code \(e.g., if you are using \(\) pair as delimiters, specify)16 3384 1 1380 6288 t +10 S1 f +(")4804 6288 w +10 R f +(\))4845 6288 w +10 S1 f +(")4878 6288 w +10 R f +(as)4959 6288 w +10 S1 f +(\\)5098 6288 w +10 R f +(0x29\).)5142 6288 w +(The opening delimiter may be the same or different from the closing delimiter.)12 3244 1 1380 6408 t +(a\) The \256rst line contains characters used to enclose \(bracket\) a)10 2717 1 1380 6648 t +10 I f +(plain string)1 489 1 4145 6648 t +10 R f +(. Plain strings are)3 766 1 4634 6648 t +( suggest to stick to)4 805( I)1 106( input data or directly sent to output.)7 1560(directly matched to)2 803 4 1580 6768 t +10 S1 f +(" ")1 155 1 4894 6768 t +10 R f +(pair for)1 311 1 5089 6768 t +( ASCII code for)3 691( The)1 230(plain strings.)1 534 3 1580 6888 t +10 S1 f +(")3077 6888 w +10 R f +(is)3160 6888 w +10 S1 f +(\\)3285 6888 w +10 R f +(0d34 =)1 298 1 3329 6888 t +10 S1 f +(\\)3685 6888 w +10 R f +(0x22 =)1 298 1 3729 6888 t +10 S1 f +(\\)4085 6888 w +10 R f +( it inside the)3 546(0o42 if you need)3 725 2 4129 6888 t +(string itself.)1 486 1 1580 7008 t +( the)1 166(b\) The second line contains characters to mark the beginning and the end of)13 3258 2 1380 7248 t +10 I f +(list)4848 7248 w +10 R f +(. Lists are)2 429 1 4971 7248 t +( 6)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7728 t +cleartomark +showpage +restore +%%EndPage: 6 6 +%%Page: 7 7 +save +mark +7 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +( suggest [ and ] delimiters for the list \(ASCII code)10 2093( I)1 100( character codes.)2 684(used to translate single)3 943 4 1580 960 t +(of)1580 1080 w +10 S1 f +(")1705 1080 w +10 R f +(])1746 1080 w +10 S1 f +(")1779 1080 w +10 R f +(is:)1862 1080 w +10 S1 f +(\\)2048 1080 w +10 R f +(0d93 =)1 298 1 2092 1080 t +10 S1 f +(\\)2448 1080 w +10 R f +(0x5D =)1 320 1 2492 1080 t +10 S1 f +(\\)2870 1080 w +10 R f +( [a-zA-)1 334(0o135\). The lists may include ranges, for example:)7 2152 2 2914 1080 t +( that order is impor-)4 851( Note)1 265( capital\) and digits.)3 805(Z0-9] will include all Latin letters \(small and)7 1899 4 1580 1200 t +( equivalent to [abcd], while [d-a] will result in an error. If you want to include)15 3308(tant: [a-d] is)2 512 2 1580 1320 t +10 S1 f +(")1580 1440 w +10 R f +(-)1621 1440 w +10 S1 f +(")1654 1440 w +10 R f +( are only)2 375(\(minus\) in the list, you need to place it as the \256rst or the last character. There)16 3291 2 1734 1440 t +(two special characters on the list, the)6 1520 1 1580 1560 t +10 S1 f +(")3133 1560 w +10 R f +(-)3174 1560 w +10 S1 f +(")3207 1560 w +10 R f +(described above, and the)3 1010 1 3281 1560 t +10 S1 f +(")4324 1560 w +10 R f +(])4365 1560 w +10 S1 f +(")4398 1560 w +10 R f +( need to)2 334(character. You)1 594 2 4472 1560 t +(enter the)1 372 1 1580 1680 t +10 S1 f +(")2003 1680 w +10 R f +(])2044 1680 w +10 S1 f +(")2077 1680 w +10 R f +( ASCII character table [)4 1052(as its code. E.g., for)4 897 2 2169 1680 t +10 S f +(*)4118 1680 w +10 R f +(--] is equivalent to [)4 893 1 4168 1680 t +10 S f +(*)5061 1680 w +10 R f +(+,-], is)1 289 1 5111 1680 t +(equivalent to [)2 595 1 1580 1800 t +10 S1 f +(\\)2191 1800 w +10 R f +(42)2235 1800 w +10 S1 f +(\\)2351 1800 w +10 R f +(43)2395 1800 w +10 S1 f +(\\)2511 1800 w +10 R f +(44)2555 1800 w +10 S1 f +(\\)2671 1800 w +10 R f +( the list does not matter unless the)7 1428(45]. The order of characters in)5 1257 2 2715 1800 t +( to the output list \(this will be explained later\). Empty lists do not)13 2911(input list corresponds)2 909 2 1580 1920 t +(make sense.)1 490 1 1580 2040 t +( delimiters for)2 590(c\) The third line of delimiter speci\256cation contains)7 2105 2 1380 2280 t +10 I f +(regular expression)1 764 1 4112 2280 t +10 R f +(s and)1 220 1 4876 2280 t +10 I f +(substi-)5133 2280 w +(tution expression)1 696 1 1580 2400 t +10 R f +( strings are used for)4 827(s. These)1 370 2 2276 2400 t +10 S1 f +(")3508 2400 w +10 R f +(\257exible)3549 2400 w +10 S1 f +(")3849 2400 w +10 R f +( the text in the input \256le.)6 1035(matches to)1 440 2 3925 2400 t +(They are very similar to the ones used in UN)9 1956 1 1580 2520 t +10 S f +(*)3536 2520 w +10 R f +( grep,)1 279(X for searching text in utilities like:)6 1535 2 3586 2520 t +( only a subset of full UN)6 1042(sed, vi, awk, etc., though)4 1036 2 1580 2640 t +10 S f +(*)3658 2640 w +10 R f +(X regular expression syntax is used here.)6 1692 1 3708 2640 t +(I suggest enclosing them within braces)5 1641 1 1580 2760 t +10 S f +({)3264 2760 w +10 R f +(and)3355 2760 w +10 S f +(})3542 2760 w +10 R f +(\(ASCII code for)2 684 1 3633 2760 t +10 S f +(})4361 2760 w +10 R f +(is)4453 2760 w +10 S1 f +(\\)4580 2760 w +10 R f +(0d125 =)1 350 1 4624 2760 t +10 S1 f +(\\)5034 2760 w +10 R f +(0x7D =)1 322 1 5078 2760 t +10 S1 f +(\\)1596 2880 w +10 R f +( for input sequences, and for output)6 1483(0o175\). Actually, regular expressions can only be used)7 2277 2 1640 2880 t +(sequences the)1 567 1 1580 3000 t +10 S f +({})2188 3000 w +10 R f +( explained below.)2 741(are used to enclose substitution sequences. This will be)8 2334 2 2325 3000 t +( is adapted from the docu-)5 1115(The description of the syntax for regular/substitution expressions)7 2705 2 1580 3120 t +( Henry Spencer, University of Toronto --- this regular)8 2292(mentation for the regexp package of)5 1528 2 1580 3240 t +(expression package was incorporated, after minute modi\256cations, into the program.)9 3405 1 1580 3360 t +10 B f +(REGULAR EXPRESSION SYNTAX)2 1617 1 2681 3720 t +10 R f +( `)1 69( by)1 169( more branches, separated)3 1068(A regular expression is zero or)5 1277 4 1580 3840 t +10 S f +(\372)4195 3840 w +10 R f +( matches anything that)3 935('. It)1 188 2 4277 3840 t +( `)1 66( The)1 221(matches one of the branches.)4 1187 3 1580 3960 t +10 S f +(\372)3086 3960 w +10 R f +(' simply means)2 627 1 3168 3960 t +10 S1 f +(")3828 3960 w +10 R f +(or)3869 3960 w +10 S1 f +(")3952 3960 w +10 R f +(.)3993 3960 w +( the \256rst, fol-)3 654( for)1 184( matches a match)3 720( It)1 129(A branch is zero or more pieces, concatenated.)7 1933 5 1780 4080 t +(lowed by a match for the second, etc.)7 1544 1 1580 4200 t +( is an atom possibly followed by `)7 1498(A piece)1 326 2 1780 4320 t +10 S f +(*)3604 4320 w +10 R f +(', `+', or `?'. An atom followed by)7 1746 1 3654 4320 t +(`)1580 4440 w +10 S f +(*)1613 4440 w +10 R f +( followed by `+')3 811( atom)1 245( An)1 200( more matches of the atom.)5 1187( a sequence of 0 or)5 855(' matches)1 439 6 1663 4440 t +( `?' matches)2 517( atom followed by)3 772( An)1 194( sequence of 1 or more matches of the atom.)9 1894(matches a)1 443 5 1580 4560 t +(zero or one occurrences of atom.)5 1346 1 1580 4680 t +( the regular)2 500( for)1 197( match)1 292( \(matching a)2 611( is a regular expression in parentheses)6 1651(An atom)1 369 6 1780 4800 t +( `)1 67( character\), a)2 600( any single)2 451( \(matching)1 472(expression\), a range \(see below\), `.')5 1473 5 1580 4920 t +10 S1 f +(\\)4659 4920 w +10 R f +( a)1 77(' followed by)2 620 2 4703 4920 t +( that character\), or a single character with no other signi\256cance)10 2722(single character \(matching)2 1098 2 1580 5040 t +( character\).)1 455(\(matching that)1 621 2 1580 5160 t +( normally matches any single)4 1211( It)1 162( ]'.)1 123( in `[)2 280( characters enclosed)2 822(A range is a sequence of)5 1022 6 1780 5280 t +( begins with `)3 580( the sequence)2 561( If)1 136(character from the sequence.)3 1181 4 1580 5400 t +10 S1 f +(\303)4038 5400 w +10 R f +( charac-)1 361(', it matches any single)4 968 2 4071 5400 t +( two characters in the sequence are separated by `-',)9 2154( If)1 134( from the rest of the sequence.)6 1265(ter not)1 267 4 1580 5520 t +( between them \(e.g. `[0-9]' matches)5 1491( list of ASCII characters)4 1154( for the full)3 491(this is shorthand)2 684 4 1580 5640 t +( it the \256rst character \(fol-)5 1060( make)1 286( include a literal `]' in the sequence,)7 1519( To)1 181(any decimal digit\).)2 774 5 1580 5760 t +(lowing a possible `)3 788 1 1580 5880 t +10 S1 f +(\303)2368 5880 w +10 R f +( character. The regu-)3 856( or last)2 356( include a literal `-', make it the \256rst)8 1517('\). To)1 270 4 2401 5880 t +( pair. These subex-)3 822( \))1 65( which are enclosed in a \()6 1145(lar expression can contains subexpressions)4 1788 4 1580 6000 t +( 9 and can be nested. The numbering of subexpressions is given)11 2656(pressions are numbered 1 to)4 1164 2 1580 6120 t +(in the order of their opening parentheses)6 1661 1 1580 6240 t +10 S1 f +(")3274 6240 w +10 R f +(\()3315 6240 w +10 S1 f +(")3348 6240 w +10 R f +(. For example:)2 596 1 3389 6240 t +(\(111\)...\(22\(333\)222\(444\)222\)...\(555\))2180 6360 w +(Note that expression 2 contains within itself expressions 3 and 4.)10 2675 1 1580 6480 t +( below)1 286(These subexpressions can be referenced in the substitution string which is described)11 3534 2 1580 6600 t +(in the paragraph below, or can be used to delimit atoms.)10 2321 1 1580 6720 t +(Examples:)1780 6840 w +10 S f +({)1780 6960 w +10 R f +([)1828 6960 w +10 S1 f +(\\)1877 6960 w +10 R f +(0d32)1921 6960 w +10 S1 f +(\\)2137 6960 w +10 R f +(0d09])2181 6960 w +10 S1 f +(\\)2430 6960 w +10 R f +(0d10)2474 6960 w +10 S f +(})2674 6960 w +10 R f +(--- will match space or tab followed by new line)9 1993 1 2755 6960 t +10 S f +({)1780 7080 w +10 R f +([Tt][Ss])1828 7080 w +10 S f +(})2144 7080 w +10 R f +(--- will match TS, Ts, tS and ts)7 1292 1 2225 7080 t +10 S f +({)1780 7200 w +10 R f +(TS)1828 7200 w +10 S f +(\372)1977 7200 w +10 R f +(Ts)2059 7200 w +10 S f +(\372)2191 7200 w +10 R f +(tS)2273 7200 w +10 S f +(\372)2389 7200 w +10 R f +(ts)2471 7200 w +10 S f +(})2538 7200 w +10 R f +(--- same as above)3 724 1 2619 7200 t +( 7)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 7 7 +%%Page: 8 8 +save +mark +8 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +10 S f +({)1780 960 w +10 R f +([)1828 960 w +10 S1 f +(\\)1877 960 w +10 R f +(0d09-)1921 960 w +10 S1 f +(\\)2170 960 w +10 R f +(0d15 ][)1 305 1 2214 960 t +10 S1 f +(\303)2519 960 w +10 R f +(hH][)2552 960 w +10 S1 f +(\303)2740 960 w +10 R f +(uU][a-zA-Z])2773 960 w +10 S f +(*)3281 960 w +10 R f +([)3331 960 w +10 S1 f +(\\)3380 960 w +10 R f +(0d09-)3424 960 w +10 S1 f +(\\)3673 960 w +10 R f +(0d15 ])1 272 1 3717 960 t +10 S f +(})3989 960 w +10 R f +( do not start)3 520(--- all words which)3 804 2 4076 960 t +(with hu, Hu, hU, HU. There is a space between)9 1959 1 1980 1080 t +10 S1 f +(\\)3988 1080 w +10 R f +(0d15 and ].)2 468 1 4032 1080 t +( like)1 205(Note that specifying expressions)3 1388 2 1980 1200 t +10 S f +({)3628 1200 w +10 R f +(.)3676 1200 w +10 S f +(*})3701 1200 w +10 R f +(\(i.e., match all characters\) does not)5 1546 1 3854 1200 t +( sense, since it would mean here: match the whole input \256le. However,)12 2946(make much)1 474 2 1980 1320 t +(expressions like)1 650 1 1980 1440 t +10 S f +({)2664 1440 w +10 R f +(A.)2712 1440 w +10 S f +(*)2809 1440 w +10 R f +(B)2859 1440 w +10 S f +(})2926 1440 w +10 R f +( B,)1 127(should be acceptable, since they match a pair of A and)10 2265 2 3008 1440 t +( for a string like:)4 714(and everything in between them, e.g.)5 1540 2 1980 1560 t +10 S1 f +(")4271 1560 w +10 R f +(This is Mr. Allen and this)5 1088 1 4312 1560 t +(is Mr. Brown.)2 577 1 1980 1680 t +10 S1 f +(")2557 1680 w +10 R f +(this expression should match the string:)5 1626 1 2631 1680 t +10 S1 f +(")4290 1680 w +10 R f +(Allen and this is Mr. B)5 957 1 4331 1680 t +10 S1 f +(")5288 1680 w +10 R f +(.)5329 1680 w +(Remember to put a backslash)4 1260 1 1580 1800 t +10 S1 f +(" \\ ")2 142 1 2886 1800 t +10 R f +( [ \( \))3 195( of the following characters: .)5 1285(in front)1 318 3 3074 1800 t +10 S f +(\372)4904 1800 w +10 R f +(? +)1 132 1 4986 1800 t +10 S f +(*)5150 1800 w +10 S1 f +(\\)5248 1800 w +10 R f +(if)5339 1800 w +( Inside the range they have)5 1142( ].)1 90( literal meaning outside the range enclosed in [)8 1981(you want their)2 607 4 1580 1920 t +( you know the syntax of UN)6 1192( If)1 134(their literal meaning.)2 853 3 1580 2040 t +10 S f +(*)3759 2040 w +10 R f +(X regular expressions, please note that)5 1591 1 3809 2040 t +10 S1 f +(\303)1612 2160 w +10 R f +( treated as normal characters \(with the exception)7 1999( are not supported and are)5 1083(and $ anchors)2 606 3 1712 2160 t +(of)1580 2280 w +10 S1 f +(\303)1728 2280 w +10 R f +( ]\).)1 123(negation within [)2 699 2 1826 2280 t +10 B f +(SUBSTITUTION EXPRESSIONS)1 1481 1 2749 2520 t +10 R f +( It)1 137( made.)1 284(After \256nding a match for a regular expression in the input text, a substitution is)14 3399 3 1580 2640 t +( another string,)2 628(can be a simple substitution where the whole matching string is replaced by)12 3192 2 1580 2760 t +( portion or the whole matching string. The subexpressions \(the ones)10 3031(or it may reuse a)4 789 2 1580 2880 t +( input text can be)4 744(enclosed in parentheses\) within the regular expression which matched the)9 3076 2 1580 3000 t +( special mean-)2 604( the following characters have)4 1254( Only)1 271(referenced in the substitution expression.)4 1691 4 1580 3120 t +(ing within substitution expression:)3 1406 1 1580 3240 t +( will put the whole matching string.)6 1473(& ---)1 399 2 1780 3360 t +10 S1 f +(\\)1796 3480 w +10 R f +( \).)1 90( will put the match for the 1st subexpression in \()10 2012(1 ---)1 339 3 1840 3480 t +10 S1 f +(\\)1796 3600 w +10 R f +( will put the string which matched 2nd subexpression, etc.)9 2395(2 ---)1 339 2 1840 3600 t +10 S1 f +(\\)1796 3720 w +10 R f +( a replacement string the 9th subexpression \(provided that there)9 2663( will place in)3 558(9 ---)1 339 3 1840 3720 t +( pairs in the regular expression\))5 1301( \))1 65(was 9 \()2 304 3 1980 3840 t +( other characters and sequences within the substitu-)7 2152( All)1 199(Only 9 subexpressions are allowed.)4 1469 3 1580 4080 t +( able to put a single)5 845(tion expression will be placed in a substitution string as written. To be)12 2975 2 1580 4200 t +( the unchanged codes of)4 1020( be able to place)4 700( To)1 182(backslash there, you need to put two of them.)8 1918 4 1580 4320 t +( need to precede them with a backslash)7 1623(the above characters \(i.e., to make them literals\), you)8 2197 2 1580 4440 t +10 S1 f +(" \\ ")2 142 1 1580 4560 t +10 R f +( to get & in the output string you need to write it as)13 2203(, i.e.,)1 208 2 1722 4560 t +10 S1 f +(\\)4186 4560 w +10 R f +(&. Similarly, to place literal)4 1170 1 4230 4560 t +10 S1 f +(\\)1596 4680 w +10 R f +(1,)1640 4680 w +10 S1 f +(\\)1770 4680 w +10 R f +(2, etc., you need to enter it as)7 1268 1 1814 4680 t +10 S1 f +(\\ \\)1 88 1 3137 4680 t +10 R f +(1,)3241 4680 w +10 S1 f +(\\ \\)1 88 1 3371 4680 t +10 R f +( that characters .+[]\(\))3 883( Note)1 266(2, etc.)1 255 3 3475 4680 t +10 S1 f +(\303)4879 4680 w +10 R f +(, etc. which)2 488 1 4912 4680 t +( in the regular expressions, do not have any special meaning in the)12 2882(had a special meaning)3 938 2 1580 4800 t +(substitution expression and will be output as written.)7 2167 1 1580 4920 t +(Example:)1780 5040 w +(The regular expression:)2 958 1 1780 5160 t +10 S f +({)1780 5280 w +10 R f +(\([Tt]\)\([Ss]\))1828 5280 w +10 S f +(})2276 5280 w +10 R f +( substitution expression)2 1015(and the corresponding)2 955 2 2383 5280 t +10 S f +({)4413 5280 w +10 S1 f +(\\)4477 5280 w +10 R f +(1.)4521 5280 w +10 S1 f +(\\)4612 5280 w +10 R f +(2)4656 5280 w +10 S f +(})4706 5280 w +10 R f +(puts a period)2 586 1 4814 5280 t +(between adjoining letters t and s preserving their letter case.)9 2467 1 1980 5400 t +(The expression:)1 643 1 1980 5520 t +10 S f +({)1780 5640 w +10 R f +(\([A-Za-z]+\)-[)1828 5640 w +10 S1 f +(\\)2418 5640 w +10 R f +(0x09])2462 5640 w +10 S f +(*)2695 5640 w +10 R f +(\([)2745 5640 w +10 S1 f +(\\)2827 5640 w +10 R f +(0x0A-)2871 5640 w +10 S1 f +(\\)3142 5640 w +10 R f +(0x0D]+\)[)3186 5640 w +10 S1 f +(\\)3612 5640 w +10 R f +(0x09])3656 5640 w +10 S f +(*)3889 5640 w +10 R f +(\([A-Za-z,.?;:)3939 5640 w +10 S1 f +(" \\)1 85 1 4442 5640 t +10 R f +(\)'`!]+\)[)4543 5640 w +10 S1 f +(\\)4879 5640 w +10 R f +(0x09])4923 5640 w +10 S f +(})5156 5640 w +10 R f +(and the substitution expression)3 1302 1 1980 5760 t +10 S f +({)3329 5760 w +10 S1 f +(\\)3393 5760 w +10 R f +(1)3437 5760 w +10 S1 f +(\\)3503 5760 w +10 R f +(3)3547 5760 w +10 S1 f +(\\)3613 5760 w +10 R f +(2)3657 5760 w +10 S f +(})3707 5760 w +10 R f +( \(when you under-)3 803(dehyphenate words)1 795 2 3802 5760 t +( changed to)2 506( is)1 148( \(NL\)cert)1 462( con-)1 258( one, you are a guru...\). For example:)7 1641(stand this)1 405 6 1980 5880 t +( looks for one or more letters)6 1333(concert\(NL\), where NL stands for New Line. It)7 2087 2 1980 6000 t +(\(saves them as substring 1\) followed by a hyphen \(which may be followed by zero)14 3420 1 1980 6120 t +( \(ASCII char-)2 566(or more spaces or tabs\). The hyphen must be followed by a NewLine)12 2854 2 1980 6240 t +( hex form various new line sequences\) and saves NewLine sequence)10 2871(acters 0A-0D)1 549 2 1980 6360 t +( for zero or more tabs and spaces \(at the)9 1835( it looks)2 375( Then)1 289(as a subexpression 2.)3 921 4 1980 6480 t +( the rest of the hyphenated word and saves)8 1768(beginning of the line\). Then it looks for)7 1652 2 1980 6600 t +( it looks again)3 621( Then)1 282(it as substring 3. The word may have punctuation attached.)9 2517 3 1980 6720 t +( which)1 293(for some spaces or tabs. The substitution expression junks all sequences)10 3127 2 1980 6840 t +( but in a)3 355(were not within \(\), i.e., hyphen and spaces/tabs and inserts only substrings)11 3065 2 1980 6960 t +(different order. The)2 821 1 1980 7080 t +10 S1 f +(\\)2861 7080 w +10 R f +(1 \(word beginning\) is followed by)5 1463 1 2905 7080 t +10 S1 f +(\\)4428 7080 w +10 R f +( fol-)1 187(3 \(word end\) and)3 741 2 4472 7080 t +( NewLine ---)2 562(lowed by the)2 556 2 1980 7200 t +10 S1 f +(\\)3160 7200 w +10 R f +(2. The)1 276 1 3204 7200 t +10 S f +({)3526 7200 w +10 S1 f +(\\)3590 7200 w +10 R f +(2)3634 7200 w +10 S1 f +(\\)3700 7200 w +10 R f +(1)3744 7200 w +10 S1 f +(\\)3810 7200 w +10 R f +(3)3854 7200 w +10 S f +(})3904 7200 w +10 R f +(would be probably equally good,)4 1402 1 3998 7200 t +( 8)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 8 8 +%%Page: 9 9 +save +mark +9 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +( to the beginning of the)5 975( the punctuation matching)3 1071( move)1 290(though you would need to)4 1084 4 1980 960 t +(regular expression.)1 767 1 1980 1080 t +( enclosed in the)3 672(Ad.3\) Starting sequence. This sequence will be sent to the output before any text. It is)15 3648 2 1080 1200 t +( it to output LaTeX preamble. However, it can be empty, if not)12 2738(pair of string delimiters. I use)5 1282 2 1380 1320 t +( \(sequence\) may contain any characters, including new lines, etc.)9 2665(used. The)1 429 2 1380 1440 t +(Example:)1580 1560 w +10 S1 f +("" #)1 462 1 1780 1680 t +10 R f +(empty sequence)1 648 1 2275 1680 t +(Example:)1580 1920 w +10 S1 f +(" \\)1 85 1 1780 2040 t +10 R f +(documentstyle)1881 2040 w +10 S f +({)2464 2040 w +10 R f +(article)2512 2040 w +10 S f +(})2761 2040 w +10 S1 f +(\\)1796 2160 w +10 R f +(input cyracc)1 498 1 1840 2160 t +10 S1 f +(\\)1796 2280 w +10 R f +(begin)1840 2280 w +10 S f +({)2062 2280 w +10 R f +(document)2110 2280 w +10 S f +(})2504 2280 w +10 S1 f +(")1780 2400 w +10 R f +(is right \(note a new line at the end\), but)9 1642 1 1580 2520 t +10 S1 f +(" \\)1 85 1 1780 2640 t +10 R f +(documentstyle)1881 2640 w +10 S f +({)2464 2640 w +10 R f +(article)2512 2640 w +10 S f +(})2761 2640 w +10 S1 f +(\\)1796 2760 w +10 R f +(input cyracc)1 498 1 1840 2760 t +10 S1 f +(#)2569 2760 w +10 R f +(this comment will be included!)4 1276 1 2652 2760 t +10 S1 f +(\\)1796 2880 w +10 R f +(begin)1840 2880 w +10 S f +({)2062 2880 w +10 R f +(document)2110 2880 w +10 S f +(})2504 2880 w +10 S1 f +(" #)1 190 1 2552 2880 t +10 R f +(while this will not)3 750 1 2775 2880 t +(is wrong.)1 380 1 1580 3000 t +(Ad.4\) Ending sequence. Similar to 1\), but will be appended at the end of the output \256le.)16 3630 1 1080 3240 t +(For example:)1 538 1 1580 3360 t +10 S1 f +(" \\)1 85 1 1780 3480 t +10 R f +(end)1881 3480 w +10 S f +({)2025 3480 w +10 R f +(document)2073 3480 w +10 S f +(})2467 3480 w +10 S1 f +(")1780 3600 w +10 R f +( of KOI7, there are two charac-)6 1325(Ad.5\) Number of input character sets. For example, in some incarnation)10 2995 2 1080 3840 t +( \(CTRL-N\),)1 486(ter sets: Latin and Cyrillic. Cyrillic character sequence follows SHIFT-OUT character)10 3534 2 1380 3960 t +10 S1 f +(\\)1396 4080 w +10 R f +( SHIFT-IN character \(CTRL-O\),)3 1352(0x0e, and is terminated by)4 1113 2 1440 4080 t +10 S1 f +(\\)3961 4080 w +10 R f +( way of looking at)4 787(0x0f. Another)1 608 2 4005 4080 t +( ones follow CTRL-N.)3 929( cyrillic)1 349(it is that Latin characters follow CTRL-O and)7 1884 3 1380 4200 t +( input char sets,)3 675(If there is only one character set on input you should specify 0 as a number of)16 3345 2 1380 4440 t +(since the input \256le obviously does not contain any SHIFT-OUT/IN sequences.)10 3213 1 1380 4560 t +( lines appear only if you)5 1078( These)1 318( each input character set.)4 1076(Ad.6\) SHIFT-OUT/SHIFT-IN sequences for)3 1848 4 1080 4800 t +(speci\256ed nonzero number of character sets. These lines contain also)9 2854 1 1380 4920 t +10 S1 f +(")4275 4920 w +10 R f +(nesting sequences)1 734 1 4316 4920 t +10 S1 f +(")5050 4920 w +10 R f +(, which)1 309 1 5091 4920 t +( do not use)3 466( You)1 240(will be explained later in this section.)6 1556 3 1380 5040 t +10 S1 f +(")3677 5040 w +10 R f +(nesting sequences)1 729 1 3718 5040 t +10 S1 f +(")4447 5040 w +10 R f +(frequently, and let us)3 876 1 4524 5040 t +( regular expressions)2 844( strings or)2 448( The)1 237(assume for a moment that nesting data are empty strings.)9 2491 4 1380 5160 t +( matching)1 421(speci\256ed here are matched with the contents of input text. If match was found, the)14 3599 2 1380 5280 t +(sequence is usually deleted from the input text and:)8 2117 1 1380 5400 t +( to the new)3 489(a\) for SHIFT-OUT sequence: the current input character set number is changed)11 3331 2 1580 5520 t +(one corresponding to the SHIFT-OUT sequence, or)6 2102 1 1780 5640 t +( the previous input character set number is restored, \(i.e., the one)11 2707(b\) for SHIFT-IN sequence:)3 1113 2 1580 5760 t +( that only the)3 612( Note)1 281(which preceded the SHIFT-OUT sequence for the current set\).)8 2727 3 1780 5880 t +( SHIFT-IN sequences for other)4 1293( The)1 226(SHIFT-IN sequence for the current set is matched.)7 2101 3 1780 6000 t +( bracketing of sets is assumed)5 1260( The)1 227(character sets than the current set are not matched.)8 2133 3 1780 6120 t +( set)1 153(perfect. If the SHIFT-IN sequence for the current set is an empty string, the input)14 3467 2 1780 6240 t +(number is changed when SHIFT-OUT sequence of the new set is detected.)11 3070 1 1780 6360 t +( set, you have to specify a line consisting of 6 strings/expressions)11 2961(For each input character)3 1059 2 1380 6480 t +(separated by spaces:)2 830 1 1380 6600 t +(SO-match SO-subs NEST-up NEST-down SI-match SI-subs)5 2463 1 1446 6720 t +(where:)1380 6840 w +( the string or regular expression for the SHIFT-OUT sequence for the current char-)13 3479(SO-match ---)1 541 2 1380 6960 t +(acter set. If detected, the input character set is changed to this set.)12 2709 1 1580 7080 t +( string \(i.e., the input sequence matching SO-match is)8 2401(SO-subs --- this is usually an empty)6 1619 2 1380 7200 t +( 9)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 9 9 +%%Page: 10 10 +save +mark +10 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +( be a replacement string or a substitution expression, which will substi-)11 2963(removed\). But it can)3 857 2 1580 960 t +(tute the original matching SHIFT-OUT sequence.)5 2026 1 1580 1080 t +( an empty string\). However, it can be)7 1574(NEST-up --- this string \(or a regular expression\) is usually)9 2446 2 1380 1200 t +( SHIFT-IN bracket, if SHIFT-IN sequence is not)7 2128(used to count brackets for detection of)6 1692 2 1580 1320 t +(unique. Its use is explained below.)5 1419 1 1580 1440 t +(NEST-down --- a counterpart of NEST-up. It is explained later.)9 2608 1 1380 1560 t +( input \256le matches the string or regular expression given as)10 2518(SI-match --- when a sequence in an)6 1502 2 1380 1680 t +( number is restored to the)5 1093(SI-match for a current input character set, the input character set)10 2727 2 1580 1800 t +(previous set. Note, that only SI-match for a current set is matched with input characters.)14 3625 1 1580 1920 t +( is usually an empty string \(i.e., input sequence which matched SI-match is)12 3366(SI-subs --- this)2 654 2 1380 2040 t +( if it is not, the input characters which matched the SI-match are replaced with)14 3250(removed\), but)1 570 2 1580 2160 t +(the SI-subs.)1 480 1 1580 2280 t +(The KOI7 case described above may be speci\256ed as:)8 2169 1 1380 2520 t +(2)1880 2640 w +10 S1 f +(#)2623 2640 w +10 R f +(2 input sets)2 472 1 2706 2640 t +10 S1 f +("" "" "" "" "" "" #)6 2138 1 1880 2760 t +10 R f +(Latin\(set 1\))1 471 1 4051 2760 t +10 S1 f +(" \\)1 85 1 1880 2880 t +10 R f +(016)1981 2880 w +10 S1 f +( \\)1 44( "" "" ")3 1003(" "")1 189 3 2131 2880 t +10 R f +(017)3383 2880 w +10 S1 f +( #)1 316(" "")1 189 2 3533 2880 t +10 R f +(Cyrillic\(set 2\))1 566 1 4071 2880 t +(or)2177 3000 w +(2)1880 3120 w +10 S1 f +(#)2623 3120 w +10 R f +(2 sets)1 233 1 2706 3120 t +10 S1 f +(" \\)1 85 1 1880 3240 t +10 R f +(017)1981 3240 w +10 S1 f +( "" "" "" "" #)5 1708(" "")1 189 2 2131 3240 t +10 R f +(Latin\(set 1\))1 471 1 4061 3240 t +10 S1 f +(" \\)1 85 1 1880 3360 t +10 R f +(016)1981 3360 w +10 S1 f +( "" "" "" "" #)5 1708(" "")1 189 2 2131 3360 t +10 R f +(Cyrillic\(set 2\))1 566 1 4061 3360 t +( In the)2 277(Before the input is processed, the program is initialized to the character set of the \256rst set.)16 3743 2 1380 3480 t +(above case, it is important, since declaration:)6 1845 1 1380 3600 t +(2)1880 3720 w +10 S1 f +(#)2623 3720 w +10 R f +(2 sets)1 233 1 2706 3720 t +10 S1 f +(" \\)1 85 1 1880 3840 t +10 R f +(016)1981 3840 w +10 S1 f +( "" "" "" "" #)5 1708(" "")1 189 2 2131 3840 t +10 R f +(Cyrillic\(set 1\))1 566 1 4061 3840 t +10 S1 f +(" \\)1 85 1 1880 3960 t +10 R f +(017)1981 3960 w +10 S1 f +( "" "" "" "" #)5 1708(" "")1 189 2 2131 3960 t +10 R f +(Latin\(set 2\))1 471 1 4061 3960 t +(would be wrong and would mess up the Latin characters preceding \256rst Cyrillic sequence.)13 3703 1 1380 4080 t +( translitera-)1 472(The nesting sequences are used only for speci\256c situations. I needed them to write a)14 3548 2 1380 4320 t +( LaTeX the)2 490( In)1 159( from LaTeX to KOI8.)4 978(tion table)1 394 4 1380 4440 t +10 S f +({ })1 139 1 3444 4440 t +10 R f +(pair is used for grouping and appears fre-)7 1774 1 3626 4440 t +( SHIFT-)1 353( The)1 230( of cyrillic characters is also a group in LaTeX.)9 2037(quently in the text. The sequence)5 1400 4 1380 4560 t +(OUT sequence for Russian letters in LaTeX is \(at least in my case\):)12 2820 1 1380 4680 t +10 S1 f +(")4235 4680 w +10 S f +({)4276 4680 w +10 S1 f +(\\)4340 4680 w +10 R f +(cyr)4384 4680 w +10 S1 f +(")4546 4680 w +10 R f +( of the)2 273(, and the end)3 540 2 4587 4680 t +(Russian letters is marked by)4 1183 1 1380 4800 t +10 S1 f +(")2602 4800 w +10 S f +(})2643 4800 w +10 S1 f +(")2691 4800 w +10 R f +( the)1 162(, but)1 192 2 2732 4800 t +10 S1 f +(")3126 4800 w +10 S f +(})3167 4800 w +10 S1 f +(")3215 4800 w +10 R f +(has to be the bracket matching the opening)7 1816 1 3296 4800 t +10 S1 f +(")5152 4800 w +10 S f +({)5193 4800 w +10 S1 f +(")5241 4800 w +10 R f +(in)5322 4800 w +10 S1 f +(")1380 4920 w +10 S f +({)1421 4920 w +10 S1 f +(\\)1485 4920 w +10 R f +(cyr)1529 4920 w +10 S1 f +(")1689 4920 w +10 R f +( this reason, my SHIFT-OUT/IN entry was in this case:)9 2286( For)1 205( just any bracket.)3 706(, not)1 219 4 1730 4920 t +10 S1 f +(")1880 5040 w +10 S f +({)1921 5040 w +10 S1 f +(\\)1985 5040 w +10 R f +(cyr)2029 5040 w +10 S1 f +(" "" ")2 296 1 2189 5040 t +10 S f +({)2485 5040 w +10 S1 f +(" ")1 148 1 2533 5040 t +10 S f +(})2681 5040 w +10 S1 f +(" ")1 148 1 2729 5040 t +10 S f +(})2877 5040 w +10 S1 f +( #)1 149(" "")1 189 2 2925 5040 t +10 R f +(Cyrillic codes)1 566 1 3296 5040 t +(Whenever the)1 583 1 1380 5160 t +10 S1 f +(")2015 5160 w +10 S f +({)2056 5160 w +10 S1 f +(\\)2120 5160 w +10 R f +(cyr)2164 5160 w +10 S1 f +(")2343 5160 w +10 R f +( adds +1 to it, when)5 929( It)1 147( zeroes the counter.)3 859(was found, the program)3 1029 4 2436 5160 t +(NEST-up sequence \(i.e., the)3 1179 1 1380 5280 t +10 S1 f +(")2602 5280 w +10 S f +({)2643 5280 w +10 S1 f +(")2691 5280 w +10 R f +( NEST-down)1 547(here\) is found, and subtracts 1 from it, when the)9 2078 2 2775 5280 t +(sequence is found \(i.e., the)4 1111 1 1380 5400 t +10 S1 f +(")2527 5400 w +10 S f +(})2568 5400 w +10 S1 f +(")2616 5400 w +10 R f +( checking for a SHIFT-IN sequence \(i.e., the)7 1855(\). The)1 282 2 2657 5400 t +10 S1 f +(")4831 5400 w +10 S f +(})4872 5400 w +10 S1 f +(")4920 5400 w +10 R f +(\) for cyril-)2 439 1 4961 5400 t +( is zero \(i.e., all pairs inside the cyrillic text are)10 2117(lic set is done only when the counter value)8 1903 2 1380 5520 t +( is more complicated than that \(the counter for an opened character)11 2827(matched. In fact, the process)4 1193 2 1380 5640 t +(set is placed on the stack\), but these are details you can \256nd in the code itself.)16 3223 1 1380 5760 t +( from version)2 572( Starting)1 392( is the same character?)4 970(What if the SHIFT-IN and SHIFT-OUT sequence)6 2086 4 1380 5880 t +( us assume that the SHIFT-IN and)6 1551( Let)1 222( TRANSLIT will also work in such cases.)7 1893(1.01 the)1 354 4 1380 6000 t +(SHIFT-OUT sequence is a single character)5 1760 1 1380 6120 t +10 S1 f +(")3174 6120 w +10 R f +(%)3215 6120 w +10 S1 f +(")3298 6120 w +10 R f +(which switches between two character sets. Also,)6 2027 1 3373 6120 t +( the text, we have to double it, i.e.,)8 1499(if we want to use it in)6 962 2 1380 6240 t +10 S1 f +(")3881 6240 w +10 R f +(%%)3922 6240 w +10 S1 f +(")4088 6240 w +10 R f +(will not be a SHIFT-IN/OUT)4 1231 1 4169 6240 t +(sequence but will denote a literal percent sign. We can do it in the following way:)15 3387 1 1380 6360 t +10 S1 f +( "" #)2 594( "" "")2 296( "")1 214("" "")1 395 4 1880 6480 t +10 R f +(Latin letters)1 488 1 3412 6480 t +10 S f +({)1880 6600 w +10 R f +(%\([)1928 6600 w +10 S1 f +(\303)2077 6600 w +10 R f +(%]\))2110 6600 w +10 S f +(} {)1 162 1 2259 6600 t +10 S1 f +(\\)2453 6600 w +10 R f +(1)2513 6600 w +10 S f +(})2563 6600 w +10 S1 f +("" "")1 230 1 2677 6600 t +10 S f +({)2973 6600 w +10 R f +(%\([)3021 6600 w +10 S1 f +(\303)3170 6600 w +10 R f +(%]\))3203 6600 w +10 S f +(} {)1 129 1 3352 6600 t +10 S1 f +(\\)3513 6600 w +10 R f +(1)3573 6600 w +10 S f +(})3623 6600 w +10 S1 f +(#)3737 6600 w +10 R f +(Cyrillic codes)1 566 1 3820 6600 t +(and later in the transliteration table \(see below\) we should put a line:)12 2836 1 1380 6720 t +(0)1880 6840 w +10 S1 f +(")2062 6840 w +10 R f +(%%)2103 6840 w +10 S1 f +(")2269 6840 w +10 R f +(0)2508 6840 w +10 S1 f +(")2690 6840 w +10 R f +(%)2731 6840 w +10 S1 f +(" #)1 322 1 2814 6840 t +10 R f +(change doubled % to a single one)6 1390 1 3169 6840 t +( effect, for identical SHIFT-IN/OUT sequences, can be accomplished with a -3 charac-)12 3623(The same)1 397 2 1380 6960 t +(ter set code and will be described below.)7 1680 1 1380 7080 t +( 10)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 10 10 +%%Page: 11 11 +save +mark +11 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(Ad.7\) Number of output)3 1031 1 1080 960 t +10 S1 f +(")2156 960 w +10 R f +(character sets)1 559 1 2197 960 t +10 S1 f +(")2756 960 w +10 R f +( to)1 124( characters sent)2 654( The)1 233(. This is analogous to the input case.)7 1592 4 2797 960 t +( belong to different sets. For example, when the character \(or the sequence\) from set 2)15 3558(output may)1 462 2 1380 1080 t +( \(or the sequence\) from set 1, the program \256rst sends the SHIFT-IN)12 2860(is followed by the character)4 1160 2 1380 1200 t +( then the SHIFT-OUT sequence for set 1 \(if it is not)11 2237(sequence for set 2 \(if it is not empty\) and)9 1783 2 1380 1320 t +( assigned to set 0, then no SHIFT-IN/SHIFT-OUT)7 2085(empty\). If the output character \(or sequence\) is)7 1935 2 1380 1440 t +(sequences are sent to output.)4 1177 1 1380 1560 t +( that you may have)4 856( Note)1 276(If there is only one set of output characters, you should specify 0.)12 2888 3 1380 1680 t +( and)1 177(several input sets and several output sets, though this is rare. Usually, you have one input set)16 3843 2 1380 1800 t +( Again, if you have only one output set, you do not)11 2255(many output character sets, or vice versa.)6 1765 2 1380 1920 t +( to output only when a set)6 1201(have any SHIFT-IN/SHIFT-OUT sequences, since those are send)7 2819 2 1380 2040 t +( you are free to experiment.)5 1142( But)1 211(number is changed.)2 795 3 1380 2160 t +( is similar to the input case,)6 1235(Ad.8\) SHIFT-OUT/SHIFT-IN sequences for each output character set. It)8 3085 2 1080 2400 t +( before any text is sent)5 961(however, the NEST-in and NEST-up sequences are not used here. Again,)10 3059 2 1380 2520 t +( SHIFT-OUT/IN sequences are)3 1282(to output, the character set speci\256ed as the \256rst one is assumed. If)12 2738 2 1380 2640 t +( any SHIFT-)2 587(not used \(i.e., you have only one output character set\), you will not have)13 3433 2 1380 2760 t +( KOI8 \(single character set containing all Latin and Russian)9 2645( The)1 241( lines.)1 267(OUT/SHIFT-IN data)1 867 4 1380 2880 t +( sequences\) conver-)2 807(letters\) to KOI7 \(the set using overlapping codes switched by SHIFT-OUT/IN)10 3213 2 1380 3000 t +(sion could be therefore accomplished by the following table:)8 2488 1 1380 3120 t +(2)1880 3240 w +10 S1 f +(#)2880 3240 w +10 R f +(2 output sets)2 522 1 2963 3240 t +10 S1 f +("" "" #)2 1050 1 1880 3360 t +10 R f +(Latin Letters)1 521 1 2963 3360 t +10 S1 f +(" \\)1 85 1 1880 3480 t +10 R f +(016)1981 3480 w +10 S1 f +( \\)1 44(" ")1 290 2 2131 3480 t +10 R f +(017)2481 3480 w +10 S1 f +(" #)1 299 1 2631 3480 t +10 R f +(Russian Letters case)2 831 1 2963 3480 t +( a core of your transliteration)5 1216( is)1 102( It)1 129(Ad.9\) Transliteration table for individual character or their sequences.)8 2873 4 1080 3720 t +( are 4 columns in the transliteration table:)7 1718(data. There)1 489 2 1380 3840 t +(\(inp)1680 3960 w +10 S f +(_)1841 3960 w +10 R f +(set)1891 3960 w +10 S f +(_)2002 3960 w +10 R f +(no\) \(inp)1 327 1 2052 3960 t +10 S f +(_)2379 3960 w +10 R f +(seq\) \(out)1 360 1 2429 3960 t +10 S f +(_)2789 3960 w +10 R f +(set)2839 3960 w +10 S f +(_)2950 3960 w +10 R f +(no\) \(out)1 327 1 3000 3960 t +10 S f +(_)3327 3960 w +10 R f +(seq\))3377 3960 w +( spaces. The \(input)3 790(These 4 columns are separated by)5 1404 2 1380 4080 t +10 S f +(_)3574 4080 w +10 R f +(set)3624 4080 w +10 S f +(_)3735 4080 w +10 R f +(number\) corresponds to the input char-)5 1615 1 3785 4080 t +( zero is)2 330( If)1 145( as speci\256ed above for input SHIFT-OUT/SHIFT-IN data, or zero.)9 2842(acter set number)2 703 4 1380 4200 t +( number of input sets is not zero\), the \(input)9 1943(used \(even if)2 555 2 1380 4320 t +10 S f +(_)3878 4320 w +10 R f +(sequence\) will be always matched,)4 1472 1 3928 4320 t +( is)1 112(irrespectively of the current input character set imposed by the SHIFT-OUT sequence. This)12 3908 2 1380 4440 t +( universal \(e.g., new lines, spaces, pluses, minuses, etc.\))8 2555(useful, since some characters are)4 1465 2 1380 4560 t +( \(input)1 277( The)1 226( character set.)2 576(irrespectively of the current)3 1147 4 1380 4680 t +10 S f +(_)3606 4680 w +10 R f +(sequence\) is the sequence of characters to)6 1744 1 3656 4680 t +( is)1 104(be matched with characters in the input \256le, and if found \(within the character set speci\256ed\) it)16 3916 2 1380 4800 t +(replaced by the \(output)3 1025 1 1380 4920 t +10 S f +(_)2405 4920 w +10 R f +( to output \(i.e., the matching is interrupted, the)8 2124(sequence\) and sent)2 821 2 2455 4920 t +(\(output)1380 5040 w +10 S f +(_)1669 5040 w +10 R f +( to ouput, the input \256le pointer is moved to the \256rst character after the)14 3077(sequence\) sent)1 604 2 1719 5040 t +( \(output)1 327( The)1 226(matched sequence and matching resumes\).)4 1756 3 1380 5160 t +10 S f +(_)3689 5160 w +10 R f +(set)3739 5160 w +10 S f +(_)3850 5160 w +10 R f +(number\) speci\256es the output charac-)4 1500 1 3900 5160 t +( changes during transliteration, the appropriate SHIFT-IN)6 2424(ter set. When the output character set)6 1596 2 1380 5280 t +( sent to output. The)4 843(sequence of the previous set and the current set's SHIFT-OUT sequence is)11 3177 2 1380 5400 t +(\(output)1380 5520 w +10 S f +(_)1669 5520 w +10 R f +(set)1719 5520 w +10 S f +(_)1830 5520 w +10 R f +( zero\). In this case,)4 821(number\) may also be zero \(even if number of output sets is not)12 2699 2 1880 5520 t +(the current output set status is not changed, and no SHIFT-IN/OUT sequences is sent to output.)15 4020 1 1380 5640 t +( the substitution is performed within)5 1508( this case,)2 411( In)1 151(Lastly, the output set code may be -1, -2 or -3.)10 1950 4 1380 5760 t +( yet. Depending on the)4 947(input string that matched but the output sequence is not sent to the output)13 3073 2 1380 5880 t +(code, the following action is performed:)5 1643 1 1380 6000 t +( string)1 262( program makes the substitution in the input string \(i.e., substitutes the matching)12 3310(-1 ---)1 248 3 1580 6120 t +( does not send the output sequence to the)8 1757( It)1 135(with the input string in the input buffer\).)7 1728 3 1780 6240 t +( sequences following the currently matched one.)6 1980( input)1 272(output, but continues matching)3 1263 3 1780 6360 t +( like code -1, but matching is resumed from the \256rst sequence on the list.)14 3020(-2 ---)1 248 2 1580 6480 t +( like code -1, but matching is resumed from the input SHIFT-OUT/IN sequences.)12 3347(-3 ---)1 248 2 1580 6600 t +(E.g., if the unprocessed text in the input \256le is:)9 1938 1 1380 6720 t +(mental procedure was not successful since..........)5 1983 1 1880 6840 t +(and there was a line in transliteration table:)7 1778 1 1380 6960 t +(0)1880 7080 w +10 S1 f +(")1996 7080 w +10 R f +(me)2037 7080 w +10 S1 f +(")2159 7080 w +10 R f +(-1)2299 7080 w +10 S1 f +(")2448 7080 w +10 R f +(you)2489 7080 w +10 S1 f +(")2639 7080 w +10 R f +(the input text would be changed to:)6 1458 1 1380 7200 t +( 11)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 11 11 +%%Page: 12 12 +save +mark +12 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(yountal procedure was not successful since..........)5 2011 1 1880 960 t +( -2)1 123( The)1 228( would be applied to this text, rather than original text.)10 2326(and all remaining matching data)4 1343 4 1380 1080 t +( -3 code backsteps)3 782( The)1 229( matching of transliteration starts.)4 1410(code backsteps to the point where the)6 1599 4 1380 1200 t +( point where the input SHIFT-OUT and SHIFT-IN sequences are matched.)10 3201(even further, to the)3 819 2 1380 1320 t +( is crucial here, for the case of output set code -1/-2/-3)11 2381(Since the order of sequences to match)6 1639 2 1380 1440 t +( HERE.)1 331( CAREFUL)1 500( BE)1 205(even one-character input sequences are matched in the order speci\256ed.)9 2984 4 1380 1560 t +( -2/-3, be sure that the resulting sequence after)8 2008(You may create in\256nite loops. If you use code)8 2012 2 1380 1680 t +(substitution with the code -2/-3, will not match previous sequences with codes -2/-3.)12 3471 1 1380 1800 t +(The \(output)1 492 1 1380 1920 t +10 S f +(_)1872 1920 w +10 R f +(sequence\) is a sequence which substitutes the corresponding \(input)8 2857 1 1922 1920 t +10 S f +(_)4779 1920 w +10 R f +(sequence\). If)1 571 1 4829 1920 t +(\(output)1380 2040 w +10 S f +(_)1669 2040 w +10 R f +(sequence\) is)1 519 1 1719 2040 t +10 S1 f +("")2292 2040 w +10 R f +(\(i.e., empty string\) then \(input)4 1318 1 2428 2040 t +10 S f +(_)3746 2040 w +10 R f +( The)1 241(sequence\) is effectively deleted.)3 1363 2 3796 2040 t +(\(input)1380 2160 w +10 S f +(_)1619 2160 w +10 R f +( unless backstepping -2/-3 code)4 1319(sequence\)s are compared with input in the order speci\256ed)8 2412 2 1669 2160 t +( -1 e.g., to dehyphen-)4 891(is used \(the matching is done from the \256rst sequence again\). I use the code)14 3129 2 1380 2280 t +( -2 is useful if you want to skip next comparisons,)10 2186( Code)1 288( when changing to LaTeX.)4 1143(ate words)1 403 4 1380 2400 t +( do not see many)4 733( I)1 105( substitution string will match earlier matching expressions.)7 2486(and the resulting)2 696 4 1380 2520 t +( it can be used to resolve)6 1197(uses for the code -3, but)5 1129 2 1380 2640 t +10 S1 f +(")3766 2640 w +10 R f +(toggle)3807 2640 w +10 S1 f +(")4057 2640 w +10 R f +(SHIFT-IN/OUT sequence, as)2 1242 1 4158 2640 t +( multicharacter sequences is therefore)4 1626( order for)2 438( The)1 244(described in an example further below.)5 1712 4 1380 2760 t +( always compared after all multicharacter sequences,)6 2173(important \(the single character sequences are)5 1847 2 1380 2880 t +( should be speci\256ed)3 857( longer multicharacter sequences)3 1379( The)1 236(and can be therefore put anywhere\).)5 1548 4 1380 3000 t +(before shorter ones, unless they are some)6 1763 1 1380 3120 t +10 S1 f +(")3188 3120 w +10 R f +(preprocessing)3229 3120 w +10 S1 f +(")3783 3120 w +10 R f +(steps with codes -1/-2/-3. The order)5 1530 1 3870 3120 t +( speci\256c order,)2 622( you need single character sequences matched in a)8 2141( If)1 141(may sometimes be crucial.)3 1116 4 1380 3240 t +(enter them as regular expressions, i.e., as)6 1737 1 1380 3360 t +10 S f +({)3159 3360 w +10 R f +(c)3207 3360 w +10 S f +(})3251 3360 w +10 R f +(instead of)1 408 1 3341 3360 t +10 S1 f +(")3791 3360 w +10 R f +(c)3832 3360 w +10 S1 f +(")3876 3360 w +10 R f +( the multicharacter input)3 1033( short,)1 267(. In)1 183 3 3917 3360 t +( are matched to input text in the order speci\256ed. For the sake)12 2601(sequences and regular expressions)3 1419 2 1380 3480 t +( code -1/-2/-3\) and)3 772(of ef\256ciency, the single character input sequences \(with exception of output set)11 3248 2 1380 3600 t +( of remapping and are matched in the order of character codes)11 2659(input lists are handled as a case)6 1361 2 1380 3720 t +( input set,)2 418( you specify the same single input character twice for a given)11 2579( If)1 136(associated with them.)2 887 4 1380 3840 t +( combinations of input and output sequences are)7 2145( following)1 446( The)1 245(the program will complain.)3 1184 4 1380 3960 t +(allowed:)1380 4080 w +( Sequence)1 415( Output)1 1852(Input Sequence)1 626 3 1580 4200 t +10 S1 f +(")1580 4320 w +10 I f +(plain string)1 473 1 1621 4320 t +10 S1 f +(")2094 4320 w +10 R f +(only)3780 4320 w +10 S1 f +(")3991 4320 w +10 I f +(plain string)1 473 1 4032 4320 t +10 S1 f +(")4505 4320 w +10 R f +([)1580 4440 w +10 I f +(list)1613 4440 w +10 R f +(] [)1 2077 1 1736 4440 t +10 I f +(list)3813 4440 w +10 R f +(] or)1 149 1 3936 4440 t +10 S1 f +(")4118 4440 w +10 I f +(plain string)1 473 1 4159 4440 t +10 S1 f +(")4632 4440 w +10 S f +({)1580 4560 w +10 I f +(regular expression)1 760 1 1628 4560 t +10 S f +(} {)1 1440 1 2388 4560 t +10 I f +(substitution expression)1 928 1 3828 4560 t +10 S f +(})4756 4560 w +10 R f +(or)4837 4560 w +10 S1 f +(")3813 4680 w +10 I f +(plain string)1 473 1 3854 4680 t +10 S1 f +(")4327 4680 w +10 R f +(When match is found, the matching sequence is removed and substituted with an output)13 4020 1 1380 4800 t +( results is changing the current output character set, the appropriate SHIFT-)11 3313(sequence. If this)2 707 2 1380 4920 t +( output before the transliterated output sequence. If list is used)10 2608(IN/SHIFT-OUT pair is sent to the)5 1412 2 1380 5040 t +(as the input sequence, you may either use:)7 1742 1 1380 5160 t +( character belongs to the input list,)6 1439(a\) plain string as output sequence. In this case, if current input)11 2581 2 1380 5280 t +( replaced by the output string. I use it to delete ranges of characters which do not have)17 3658(it is)1 162 2 1580 5400 t +( graphics characters\). In this case,)5 1418(any corresponding characters in the output set \(e.g., some)8 2402 2 1580 5520 t +(the order of characters on the input list is not important.)10 2308 1 1580 5640 t +( also a list then it has to contain exactly the same number of characters)14 3013(b\) if the output string is)5 1007 2 1380 5760 t +( by the 1st char-)4 675(as the input list. In this case, the 1st character from the input list is replaced)15 3145 2 1580 5880 t +( the 2nd one by the 2nd one, etc. Therefore, the order of characters)13 2775(acter from the output list,)4 1045 2 1580 6000 t +(is important.)1 514 1 1580 6120 t +( is one-to-one correspondence between characters in the input set and char-)11 3131(Theoretically, if there)2 889 2 1380 6240 t +( single line consisting of two)5 1243(acters in the output set, you can make the conversion by using a)12 2777 2 1380 6360 t +( for the program, the substitution takes the)7 1770( And)1 241( ugly... And is dif\256cult to read.)6 1299(lists. But it looks)3 710 4 1380 6480 t +( or when they are speci\256ed as matching lists.)8 1869(same time, if the characters are speci\256ed separately,)7 2151 2 1380 6600 t +( the input characters, the matching sequence may be)8 2337(If regular expression is used to match)6 1683 2 1380 6720 t +(replaced by a plain string or a substitution string, which was described above.)12 3197 1 1380 6840 t +(Examples:)1680 6960 w +(2)1980 7080 w +10 S1 f +(")2680 7080 w +10 R f +(CCCP)2721 7080 w +10 S1 f +(")2978 7080 w +10 R f +(0)3680 7080 w +10 S1 f +("")4680 7080 w +10 R f +( for input)2 396(will delete all occurrences of CCCP from the input \256le \(but not Cccp or CCCp\))14 3324 2 1680 7200 t +( 12)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 12 12 +%%Page: 13 13 +save +mark +13 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(set 2.)1 219 1 1680 960 t +(0)1980 1200 w +10 S1 f +(" \\)1 85 1 2680 1200 t +10 R f +(0xD1)2781 1200 w +10 S1 f +(")3003 1200 w +10 R f +(0)3680 1200 w +10 S1 f +(")4680 1200 w +10 R f +(ya)4721 1200 w +10 S1 f +(")4815 1200 w +10 R f +( the code)2 402(will replace all occurrences of character of)6 1818 2 1680 1320 t +10 S1 f +(\\)3962 1320 w +10 R f +(0xD1 with a two letter sequence)5 1394 1 4006 1320 t +10 S1 f +(")1680 1440 w +10 R f +(ya)1721 1440 w +10 S1 f +(")1815 1440 w +10 R f +(.)1856 1440 w +(0)1980 1680 w +10 S1 f +(\\)2696 1680 w +10 R f +( q)1 1000(0xD1 2)1 990 2 2740 1680 t +( all characters)2 635(will replace)1 508 2 1680 1800 t +10 S1 f +(\\)2905 1800 w +10 R f +(0xD1 with a character)3 1006 1 2949 1800 t +10 S1 f +(")4021 1800 w +10 R f +(q)4062 1800 w +10 S1 f +(")4112 1800 w +10 R f +(and output SHIFT-IN/OUT)2 1181 1 4219 1800 t +(sequence if necessary.)2 904 1 1680 1920 t +(2)1980 2160 w +10 S1 f +(")2680 2160 w +10 R f +(q)2721 2160 w +10 S1 f +(")2771 2160 w +10 R f +(0)3680 2160 w +10 S1 f +(" \\)1 85 1 4680 2160 t +10 R f +(0xD1)4781 2160 w +10 S1 f +(")5003 2160 w +10 R f +(will replace letter q \(if the current input set is 2\) with a code)13 2502 1 1680 2280 t +10 S1 f +(\\)4231 2280 w +10 R f +(0xD1.)4275 2280 w +(0)1980 2520 w +10 S1 f +(" \\)1 85 1 2680 2520 t +10 R f +(0xD1)2781 2520 w +10 S1 f +(")3003 2520 w +10 R f +(2)3680 2520 w +10 S1 f +(")4680 2520 w +10 R f +(ya)4721 2520 w +10 S1 f +(")4815 2520 w +10 R f +(will replace code)2 711 1 1680 2640 t +10 S1 f +(\\)2447 2640 w +10 R f +(0xD1 with a sequence ya \(assuming that SHIFT-OUT and SHIFT-IN)9 2909 1 2491 2640 t +(sequences for output set 2 are:)5 1251 1 1680 2760 t +10 S f +({)2964 2760 w +10 S1 f +(\\)3028 2760 w +10 R f +(cyr and)1 304 1 3072 2760 t +10 S f +(})3409 2760 w +10 R f +(, respectively, you will get)4 1092 1 3457 2760 t +10 S f +({)4582 2760 w +10 S1 f +(\\)4646 2760 w +10 R f +(cyr ya)1 254 1 4690 2760 t +10 S f +(})4944 2760 w +10 R f +(\).)4992 2760 w +(If a character is not speci\256ed in the transliteration table, it will be output as is, i.e., it)17 3720 1 1680 3000 t +(corresponds to a line:)3 881 1 1680 3120 t +(0)1980 3240 w +10 S1 f +(")2680 3240 w +10 R f +(c)2721 3240 w +10 S1 f +(")2765 3240 w +10 R f +(0)3680 3240 w +10 S1 f +(")4680 3240 w +10 R f +(c)4721 3240 w +10 S1 f +(")4765 3240 w +10 R f +( certain characters, you need to explicitly)6 1751(where c is the character. If you want to delete)9 1969 2 1680 3360 t +(specify this, e.g.:)2 696 1 1680 3480 t +( 0)1 863(0 [a-z])1 887 2 1980 3600 t +10 S1 f +("")4680 3600 w +10 R f +(will delete all lower case Latin letters from the text.)9 2135 1 1680 3720 t +( solving the identical SHIFT-IN/OUT sequences problem using)7 2693(Below is an example of)4 1027 2 1680 3840 t +( above. Assume, that you have 2 character sets in)9 2064(character set code -3 which I promissed)6 1656 2 1680 3960 t +( accomplished by a)3 816(the input \256le, but switching between them is)7 1877 2 1680 4080 t +10 S1 f +(")4414 4080 w +10 R f +(toggle)4455 4080 w +10 S1 f +(")4705 4080 w +10 R f +(character. That)1 613 1 4787 4080 t +( found, you should switch to the other set. Also, if you want)12 2564(is, if the toggle character is)5 1156 2 1680 4200 t +( in the set, you need to double it. Let also assume that we have)14 2637(to use the toggle character)4 1083 2 1680 4320 t +( changing tog-)2 593(2 character codes which will never, ever appear. We can fool the translit by)13 3127 2 1680 4440 t +( character code -3 to check for)6 1307(gle character to a unique character and backstepping with)8 2413 2 1680 4560 t +(SHIFT-IN/OUT sequences again. Let the % sign be a toggle character, and that we have)14 3720 1 1680 4680 t +( example codes)2 633(two codes \(for)2 592 2 1680 4800 t +10 S1 f +(\\)2971 4800 w +10 R f +(254 and)1 328 1 3031 4800 t +10 S1 f +(\\)3425 4800 w +10 R f +( The)1 222(255\) which will never appear in our text.)7 1693 2 3485 4800 t +(appropriate entries in the transliteration table may look like:)8 2461 1 1680 4920 t +(1)1980 5040 w +10 S f +({)2129 5040 w +10 R f +(%\([)2177 5040 w +10 S1 f +(\303)2326 5040 w +10 R f +(%]\))2359 5040 w +10 S f +(})2508 5040 w +10 R f +(-3)2721 5040 w +10 S f +({)2969 5040 w +10 S1 f +(\\)3049 5040 w +10 R f +(254)3093 5040 w +10 S1 f +(\\)3275 5040 w +10 R f +(1)3335 5040 w +10 S f +(})3385 5040 w +10 R f +(2)1980 5160 w +10 S f +({)2129 5160 w +10 R f +(%\([)2177 5160 w +10 S1 f +(\303)2326 5160 w +10 R f +(%]\))2359 5160 w +10 S f +(})2508 5160 w +10 R f +(-3)2721 5160 w +10 S f +({)2969 5160 w +10 S1 f +(\\)3049 5160 w +10 R f +(255)3093 5160 w +10 S1 f +(\\)3275 5160 w +10 R f +(1)3335 5160 w +10 S f +(})3385 5160 w +10 R f +(0)1980 5280 w +10 S1 f +(")2129 5280 w +10 R f +(%%)2170 5280 w +10 S1 f +(")2336 5280 w +10 R f +(0)2674 5280 w +10 S1 f +(")2889 5280 w +10 R f +(%)2930 5280 w +10 S1 f +(")3013 5280 w +10 R f +( 2; and)2 318(i.e., when the single % is seen in set 1, produce SHIFT-OUT sequence for set)14 3402 2 1680 5400 t +( SHIFT-IN sequence for set 1. The appropriate)7 1958(when a single % is seen in set 2, produce)9 1762 2 1680 5520 t +(input character set de\256nitions will be:)5 1547 1 1680 5640 t +(2)1980 5760 w +10 S1 f +(#)2525 5760 w +10 R f +(number of input character sets)4 1240 1 2608 5760 t +10 S1 f +(" \\)1 101 1 1980 5880 t +10 R f +(255)2113 5880 w +10 S1 f +( "")1 148( "" "" "")3 642(" "")1 222 3 2263 5880 t +(" \\)1 101 1 1980 6000 t +10 R f +(254)2113 6000 w +10 S1 f +( "")1 148( "" "" "")3 642(" "")1 222 3 2263 6000 t +10 R f +(However, be warned. I never tried this. If this trick does not work, please let me know.)16 3590 1 1680 6120 t +( to create your own transliteration \256le, please examine existing transliteration)10 3257(Before you decide)2 763 2 1380 6360 t +( many comments as possible there. If you allow)8 2010(\256les. Do yourself \(and others\) a favor --- put as)9 2010 2 1380 6480 t +(others to use your transliteration \256les, please include your name and e-mail address and \256le crea-)15 4020 1 1380 6600 t +(tion date.)1 380 1 1380 6720 t +( the sequences in a speci\256c order:)6 1389(Program matches)1 737 2 980 7080 t +(1\) if NEST counter is zero, Match/substitute current set SHIFT-IN sequence)10 3127 1 1230 7200 t +( 13)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 13 13 +%%Page: 14 14 +save +mark +14 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(2\) If matched, restore previous set number)6 1741 1 1230 960 t +(3\) If matched, restore previous set nest counter)7 1929 1 1230 1080 t +(4\) Match/substitute input SHIFT-OUT sequences)4 2008 1 1230 1200 t +(5\) If matched, save current set and start new one)9 2005 1 1230 1320 t +(6\) If matched, zero nest counter for NEST sequences)8 2177 1 1230 1440 t +(7\) Match/substitute transliteration sequences)3 1808 1 1230 1560 t +( matched and code = -1 make substitution in input buffer and continue matching the next)15 3969(8\) If)1 201 2 1230 1680 t +(sequence.)1380 1800 w +(9\) If matched and code = -2 make substitution and goto 7\))11 2410 1 1230 1920 t +(10\) If matched and code = -3 make substitution and goto 1\))11 2460 1 1180 2040 t +(11\) Match \(no substitution\) NEST-up and NEST-down to input buffer)9 2878 1 1180 2160 t +(12\) If NEST-up matched, increment counter for current set)8 2416 1 1180 2280 t +(13\) If NEST-down matched, decrement counter for current set)8 2554 1 1180 2400 t +(14\) If match in 7\) send substitute sequence to output)9 2167 1 1180 2520 t +(15\) If no match in 7\) \(or code -1\) output current input character)12 2628 1 1180 2640 t +(16\) Advance input pointer to point at new characters)8 2165 1 1180 2760 t +(17\) If End of File, break)5 1010 1 1180 2880 t +(18\) Goto 1\))2 482 1 1180 3000 t +9 B f +(ASCII CHARACTER CODES)2 1230 1 720 3288 t +10 R f +( ch)1 272( oct)1 422( hx)1 162( dec)1 744( ch)1 372( oct)1 322(dec hx)1 500 7 1280 3408 t +( 000)1 350(0 00)1 400 2 1380 3648 t +10 S1 f +(\303@)2380 3648 w +10 R f +( 100)1 450( 40)1 150(NUL 64)1 550 3 2680 3648 t +10 S1 f +(@)3980 3648 w +10 R f +( 001)1 350(1 01)1 400 2 1380 3768 t +10 S1 f +(\303)2380 3768 w +10 R f +( A)1 222( 101)1 450( 41)1 150( 65)1 350(A SOH)1 467 5 2413 3768 t +( 002)1 350(2 02)1 400 2 1380 3888 t +10 S1 f +(\303)2380 3888 w +10 R f +( B)1 217( 102)1 450( 42)1 150( 66)1 361(B STX)1 456 5 2413 3888 t +( 003)1 350(3 03)1 400 2 1380 4008 t +10 S1 f +(\303)2380 4008 w +10 R f +( C)1 217( 103)1 450( 43)1 150( 67)1 356(C ETX)1 461 5 2413 4008 t +( 004)1 350(4 04)1 400 2 1380 4128 t +10 S1 f +(\303)2380 4128 w +10 R f +( D)1 222( 104)1 450( 44)1 150( 68)1 356(D EOT)1 461 5 2413 4128 t +( 005)1 350(5 05)1 400 2 1380 4248 t +10 S1 f +(\303)2380 4248 w +10 R f +( E)1 211( 105)1 450( 45)1 150( 69)1 345(E ENQ)1 472 5 2413 4248 t +( 006)1 350(6 06)1 400 2 1380 4368 t +10 S1 f +(\303)2380 4368 w +10 R f +( F)1 206( 106)1 450( 46)1 150( 70)1 339(F ACK)1 478 5 2413 4368 t +( 007)1 350(7 07)1 400 2 1380 4488 t +10 S1 f +(\303)2380 4488 w +10 R f +( G)1 222( 107)1 450( 47)1 150( 71)1 361(G BEL)1 456 5 2413 4488 t +( 010)1 350(8 08)1 400 2 1380 4608 t +10 S1 f +(\303)2380 4608 w +10 R f +( H)1 222( 110)1 450( 48)1 150( 72)1 427(H BS)1 390 5 2413 4608 t +( 011)1 350(9 09)1 400 2 1380 4728 t +10 S1 f +(\303)2380 4728 w +10 R f +( I)1 183( 111)1 450( 49)1 150( 73)1 417(I HT)1 400 5 2413 4728 t +( 012)1 356(10 0a)1 444 2 1330 4848 t +10 S1 f +(\303)2380 4848 w +10 R f +( J)1 189( 112)1 456( 4a)1 144( 74)1 433(J LF)1 384 5 2413 4848 t +( 013)1 350(11 0b)1 450 2 1330 4968 t +10 S1 f +(\303)2380 4968 w +10 R f +( K)1 222( 113)1 450( 4b)1 150( 75)1 417(K VT)1 400 5 2413 4968 t +( 014)1 356(12 0c)1 444 2 1330 5088 t +10 S1 f +(\303)2380 5088 w +10 R f +( L)1 211( 114)1 456( 4c)1 144( 76)1 438(L FF)1 379 5 2413 5088 t +( 015)1 350(13 0d)1 450 2 1330 5208 t +10 S1 f +(\303)2380 5208 w +10 R f +( M)1 239( 115)1 450( 4d)1 150( 77)1 416(M CR)1 401 5 2413 5208 t +( 016)1 356(14 0e)1 444 2 1330 5328 t +10 S1 f +(\303)2380 5328 w +10 R f +( N)1 222( 116)1 456( 4e)1 144( 78)1 422(N SO)1 395 5 2413 5328 t +( 017)1 367(15 0f)1 433 2 1330 5448 t +10 S1 f +(\303)2380 5448 w +10 R f +( O)1 222( 117)1 467( 4f)1 133( 79)1 461(O SI)1 356 5 2413 5448 t +( 020)1 350(16 10)1 450 2 1330 5568 t +10 S1 f +(\303)2380 5568 w +10 R f +( P)1 206( 120)1 450( 50)1 150( 80)1 356(P DLE)1 461 5 2413 5568 t +( 021)1 350(17 11)1 450 2 1330 5688 t +10 S1 f +(\303)2380 5688 w +10 R f +( Q)1 222( 121)1 450( 51)1 150( 81)1 361(Q DC1)1 456 5 2413 5688 t +( 022)1 350(18 12)1 450 2 1330 5808 t +10 S1 f +(\303)2380 5808 w +10 R f +( R)1 217( 122)1 450( 52)1 150( 82)1 361(R DC2)1 456 5 2413 5808 t +( 023)1 350(19 13)1 450 2 1330 5928 t +10 S1 f +(\303)2380 5928 w +10 R f +( S)1 206( 123)1 450( 53)1 150( 83)1 361(S DC3)1 456 5 2413 5928 t +( 024)1 350(20 14)1 450 2 1330 6048 t +10 S1 f +(\303)2380 6048 w +10 R f +( T)1 211( 124)1 450( 54)1 150( 84)1 361(T DC4)1 456 5 2413 6048 t +( 025)1 350(21 15)1 450 2 1330 6168 t +10 S1 f +(\303)2380 6168 w +10 R f +( U)1 222( 125)1 450( 55)1 150( 85)1 334(U NAK)1 483 5 2413 6168 t +( 026)1 350(22 16)1 450 2 1330 6288 t +10 S1 f +(\303)2380 6288 w +10 R f +( V)1 222( 126)1 450( 56)1 150( 86)1 350(V SYN)1 467 5 2413 6288 t +( 027)1 350(23 17)1 450 2 1330 6408 t +10 S1 f +(\303)2380 6408 w +10 R f +( W)1 244( 127)1 450( 57)1 150( 87)1 361(W ETB)1 456 5 2413 6408 t +( 030)1 350(24 18)1 450 2 1330 6528 t +10 S1 f +(\303)2380 6528 w +10 R f +( X)1 222( 130)1 450( 58)1 150( 88)1 339(X CAN)1 478 5 2413 6528 t +( 031)1 350(25 19)1 450 2 1330 6648 t +10 S1 f +(\303)2380 6648 w +10 R f +( Y)1 222( 131)1 450( 59)1 150( 89)1 400(Y EM)1 417 5 2413 6648 t +( 032)1 356(26 1a)1 444 2 1330 6768 t +10 S1 f +(\303)2380 6768 w +10 R f +( Z)1 211( 132)1 456( 5a)1 144( 90)1 355(Z SUB)1 462 5 2413 6768 t +( 033)1 350(27 1b)1 450 2 1330 6888 t +10 S1 f +(\303)2380 6888 w +10 R f +( [)1 183( 133)1 450( 5b)1 150( 91)1 366([ ESC)1 451 5 2413 6888 t +( 034)1 356(28 1c)1 444 2 1330 7008 t +10 S1 f +(\303\\)2380 7008 w +10 R f +( 134)1 456( 5c)1 144(FS 92)1 550 3 2680 7008 t +10 S1 f +(\\)3980 7008 w +10 R f +( 035)1 350(29 1d)1 450 2 1330 7128 t +10 S1 f +(\303)2380 7128 w +10 R f +( ])1 183( 135)1 450( 5d)1 150( 93)1 422(] GS)1 395 5 2413 7128 t +( 036)1 356(30 1e)1 444 2 1330 7248 t +10 S1 f +(\303\303)2380 7248 w +10 R f +( 136)1 456( 5e)1 144(RS 94)1 550 3 2680 7248 t +10 S1 f +(\303)3980 7248 w +10 R f +( 14)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7728 t +cleartomark +showpage +restore +%%EndPage: 14 14 +%%Page: 15 15 +save +mark +15 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +( 037)1 367(31 1f)1 433 2 1330 960 t +10 S1 f +(\303)2380 960 w +10 S f +(_)2413 960 w +10 R f +( 137)1 467( 5f)1 133(US 95)1 550 3 2680 960 t +10 S f +(_)3980 960 w +10 R f +( `)1 183( 140)1 450( 60)1 150( 96)1 438( SP)1 662( 040)1 350(32 20)1 450 7 1330 1080 t +( a)1 194( 141)1 450( 61)1 150( 97)1 817( !)1 283( 041)1 350(33 21)1 450 7 1330 1200 t +( 042)1 350(34 22)1 450 2 1330 1320 t +10 S1 f +(")2380 1320 w +10 R f +( b)1 200( 142)1 450(98 62)1 250 3 3130 1320 t +( 043)1 350(35 23)1 450 2 1330 1440 t +10 S1 f +(#)2380 1440 w +10 R f +( c)1 194( 143)1 450(99 63)1 250 3 3130 1440 t +( d)1 200( 144)1 450( 64)1 150( 100)1 800( $)1 300( 044)1 350(36 24)1 450 7 1330 1560 t +( e)1 194( 145)1 450( 65)1 150( 101)1 767( %)1 333( 045)1 350(37 25)1 450 7 1330 1680 t +( f)1 183( 146)1 450( 66)1 150( 102)1 772( &)1 328( 046)1 350(38 26)1 450 7 1330 1800 t +( g)1 200( 147)1 450( 67)1 150( 103)1 817( ')1 283( 047)1 350(39 27)1 450 7 1330 1920 t +( h)1 200( 150)1 450( 68)1 150( 104)1 817( \()1 283( 050)1 350(40 28)1 450 7 1330 2040 t +( i)1 178( 151)1 450( 69)1 150( 105)1 817( \))1 283( 051)1 350(41 29)1 450 7 1330 2160 t +( 052)1 356(42 2a)1 444 2 1330 2280 t +10 S f +(*)2380 2280 w +10 R f +( j)1 178( 152)1 456(106 6a)1 294 3 3080 2280 t +( k)1 200( 153)1 450( 6b)1 150( 107)1 794( +)1 306( 053)1 350(43 2b)1 450 7 1330 2400 t +( l)1 178( 154)1 456( 6c)1 144( 108)1 825( ,)1 275( 054)1 356(44 2c)1 444 7 1330 2520 t +( m)1 228( 155)1 450( 6d)1 150( 109)1 817( -)1 283( 055)1 350(45 2d)1 450 7 1330 2640 t +( n)1 200( 156)1 456( 6e)1 144( 110)1 825( .)1 275( 056)1 356(46 2e)1 444 7 1330 2760 t +( o)1 200( 157)1 467( 6f)1 133( 111)1 822( /)1 278( 057)1 367(47 2f)1 433 7 1330 2880 t +( p)1 200( 160)1 450( 70)1 150( 112)1 800( 0)1 300( 060)1 350(48 30)1 450 7 1330 3000 t +( q)1 200( 161)1 450( 71)1 150( 113)1 800( 1)1 300( 061)1 350(49 31)1 450 7 1330 3120 t +( r)1 183( 162)1 450( 72)1 150( 114)1 800( 2)1 300( 062)1 350(50 32)1 450 7 1330 3240 t +( s)1 189( 163)1 450( 73)1 150( 115)1 800( 3)1 300( 063)1 350(51 33)1 450 7 1330 3360 t +( t)1 178( 164)1 450( 74)1 150( 116)1 800( 4)1 300( 064)1 350(52 34)1 450 7 1330 3480 t +( u)1 200( 165)1 450( 75)1 150( 117)1 800( 5)1 300( 065)1 350(53 35)1 450 7 1330 3600 t +( v)1 200( 166)1 450( 76)1 150( 118)1 800( 6)1 300( 066)1 350(54 36)1 450 7 1330 3720 t +( w)1 222( 167)1 450( 77)1 150( 119)1 800( 7)1 300( 067)1 350(55 37)1 450 7 1330 3840 t +( x)1 200( 170)1 450( 78)1 150( 120)1 800( 8)1 300( 070)1 350(56 38)1 450 7 1330 3960 t +( y)1 200( 171)1 450( 79)1 150( 121)1 800( 9)1 300( 071)1 350(57 39)1 450 7 1330 4080 t +( z)1 194( 172)1 456( 7a)1 144( 122)1 822( :)1 278( 072)1 356(58 3a)1 444 7 1330 4200 t +( 173)1 450( 7b)1 150( 123)1 822( ;)1 278( 073)1 350(59 3b)1 450 6 1330 4320 t +10 S f +({)3980 4320 w +10 R f +( 074)1 356(60 3c)1 444 2 1330 4440 t +10 S1 f +(<)2380 4440 w +10 R f +( 174)1 456(124 7c)1 294 2 3080 4440 t +10 S f +(\372)3980 4440 w +10 R f +( 175)1 450( 7d)1 150( 125)1 794( =)1 306( 075)1 350(61 3d)1 450 6 1330 4560 t +10 S f +(})3980 4560 w +10 R f +( 076)1 356(62 3e)1 444 2 1330 4680 t +10 S1 f +(>)2380 4680 w +10 R f +( 176)1 456(126 7e)1 294 2 3080 4680 t +10 S1 f +(\304)3980 4680 w +10 R f +( DEL)1 344( 177)1 467( 7f)1 133( 127)1 806( ?)1 294( 077)1 367(63 3f)1 433 7 1330 4800 t +9 B f +(CONVERSION: DECIMAL)1 1120 1 720 5208 t +9 S1 f +(<)1840 5208 w +9 B f +(--)1890 5208 w +9 S1 f +(>)1950 5208 w +9 B f +(OCTAL)2000 5208 w +9 S1 f +(<)2320 5208 w +9 B f +(--)2370 5208 w +9 S1 f +(>)2430 5208 w +9 B f +(HEX.)2480 5208 w +10 R f +( 0)1 57( C)1 207( 0 0)2 132( 3)1 198( 9 2)2 132( 1)1 396( 0)1 66( 8)1 198( 0 0)2 132( 2)1 198( 2 8)2 132( 1)1 396( 0)1 66( 4)1 198( 0 0)2 132( 1)1 198( 6 4)2 132( 0)1 396( 0)1 66( 0)1 198( 0 0)2 132( 0)1 198(0 0 0)2 182 23 1154 5328 t +( 1)1 57( C)1 207( 0 1)2 132( 3)1 198( 9 3)2 132( 1)1 396( 1)1 66( 8)1 198( 0 1)2 132( 2)1 198( 2 9)2 132( 1)1 396( 1)1 66( 4)1 198( 0 1)2 132( 1)1 198( 6 5)2 132( 0)1 396( 1)1 66( 0)1 198( 0 1)2 132( 0)1 198(0 0 1)2 182 23 1154 5448 t +( 2)1 57( C)1 207( 0 2)2 132( 3)1 198( 9 4)2 132( 1)1 396( 2)1 66( 8)1 198( 0 2)2 132( 2)1 198( 3 0)2 132( 1)1 396( 2)1 66( 4)1 198( 0 2)2 132( 1)1 198( 6 6)2 132( 0)1 396( 2)1 66( 0)1 198( 0 2)2 132( 0)1 198(0 0 2)2 182 23 1154 5568 t +( 3)1 57( C)1 207( 0 3)2 132( 3)1 198( 9 5)2 132( 1)1 396( 3)1 66( 8)1 198( 0 3)2 132( 2)1 198( 3 1)2 132( 1)1 396( 3)1 66( 4)1 198( 0 3)2 132( 1)1 198( 6 7)2 132( 0)1 396( 3)1 66( 0)1 198( 0 3)2 132( 0)1 198(0 0 3)2 182 23 1154 5688 t +( 4)1 57( C)1 207( 0 4)2 132( 3)1 198( 9 6)2 132( 1)1 396( 4)1 66( 8)1 198( 0 4)2 132( 2)1 198( 3 2)2 132( 1)1 396( 4)1 66( 4)1 198( 0 4)2 132( 1)1 198( 6 8)2 132( 0)1 396( 4)1 66( 0)1 198( 0 4)2 132( 0)1 198(0 0 4)2 182 23 1154 5808 t +( 5)1 57( C)1 207( 0 5)2 132( 3)1 198( 9 7)2 132( 1)1 396( 5)1 66( 8)1 198( 0 5)2 132( 2)1 198( 3 3)2 132( 1)1 396( 5)1 66( 4)1 198( 0 5)2 132( 1)1 198( 6 9)2 132( 0)1 396( 5)1 66( 0)1 198( 0 5)2 132( 0)1 198(0 0 5)2 182 23 1154 5928 t +( 6)1 57( C)1 207( 0 6)2 132( 3)1 198( 9 8)2 132( 1)1 396( 6)1 66( 8)1 198( 0 6)2 132( 2)1 198( 3 4)2 132( 1)1 396( 6)1 66( 4)1 198( 0 6)2 132( 1)1 198( 7 0)2 132( 0)1 396( 6)1 66( 0)1 198( 0 6)2 132( 0)1 198(0 0 6)2 182 23 1154 6048 t +( 7)1 57( C)1 207( 0 7)2 132( 3)1 198( 9 9)2 132( 1)1 396( 7)1 66( 8)1 198( 0 7)2 132( 2)1 198( 3 5)2 132( 1)1 396( 7)1 66( 4)1 198( 0 7)2 132( 1)1 198( 7 1)2 132( 0)1 396( 7)1 66( 0)1 198( 0 7)2 132( 0)1 198(0 0 7)2 182 23 1154 6168 t +( 8)1 57( C)1 207( 1 0)2 132( 3)1 198( 0 0)2 132( 2)1 396( 8)1 66( 8)1 198( 1 0)2 132( 2)1 198( 3 6)2 132( 1)1 396( 8)1 66( 4)1 198( 1 0)2 132( 1)1 198( 7 2)2 132( 0)1 396( 8)1 66( 0)1 198( 1 0)2 132( 0)1 198(0 0 8)2 182 23 1154 6288 t +( 9)1 57( C)1 207( 1 1)2 132( 3)1 198( 0 1)2 132( 2)1 396( 9)1 66( 8)1 198( 1 1)2 132( 2)1 198( 3 7)2 132( 1)1 396( 9)1 66( 4)1 198( 1 1)2 132( 1)1 198( 7 3)2 132( 0)1 396( 9)1 66( 0)1 198( 1 1)2 132( 0)1 198(0 0 9)2 182 23 1154 6408 t +( A)1 68( C)1 207( 1 2)2 132( 3)1 198( 0 2)2 132( 2)1 385( A)1 77( 8)1 198( 1 2)2 132( 2)1 198( 3 8)2 132( 1)1 385( A)1 77( 4)1 198( 1 2)2 132( 1)1 198( 7 4)2 132( 0)1 385( A)1 77( 0)1 198( 1 2)2 132( 0)1 198(0 1 0)2 182 23 1154 6528 t +( CB)1 274( 1 3)2 132( 3)1 198( 0 3)2 132( 2)1 387( B)1 75( 8)1 198( 1 3)2 132( 2)1 198( 3 9)2 132( 1)1 387( B)1 75( 4)1 198( 1 3)2 132( 1)1 198( 7 5)2 132( 0)1 387( B)1 75( 0)1 198( 1 3)2 132( 0)1 198(0 1 1)2 182 22 1154 6648 t +( CC)1 274( 1 4)2 132( 3)1 198( 0 4)2 132( 2)1 387( C)1 75( 8)1 198( 1 4)2 132( 2)1 198( 4 0)2 132( 1)1 387( C)1 75( 4)1 198( 1 4)2 132( 1)1 198( 7 6)2 132( 0)1 387( C)1 75( 0)1 198( 1 4)2 132( 0)1 198(0 1 2)2 182 22 1154 6768 t +( D)1 68( C)1 207( 1 5)2 132( 3)1 198( 0 5)2 132( 2)1 385( D)1 77( 8)1 198( 1 5)2 132( 2)1 198( 4 1)2 132( 1)1 385( D)1 77( 4)1 198( 1 5)2 132( 1)1 198( 7 7)2 132( 0)1 385( D)1 77( 0)1 198( 1 5)2 132( 0)1 198(0 1 3)2 182 23 1154 6888 t +( CE)1 268( 1 6)2 132( 3)1 198( 0 6)2 132( 2)1 391( E)1 71( 8)1 198( 1 6)2 132( 2)1 198( 4 2)2 132( 1)1 391( E)1 71( 4)1 198( 1 6)2 132( 1)1 198( 7 8)2 132( 0)1 391( E)1 71( 0)1 198( 1 6)2 132( 0)1 198(0 1 4)2 182 22 1154 7008 t +( F)1 60( C)1 207( 1 7)2 132( 3)1 198( 0 7)2 132( 2)1 393( F)1 69( 8)1 198( 1 7)2 132( 2)1 198( 4 3)2 132( 1)1 393( F)1 69( 4)1 198( 1 7)2 132( 1)1 198( 7 9)2 132( 0)1 393( F)1 69( 0)1 198( 1 7)2 132( 0)1 198(0 1 5)2 182 23 1154 7128 t +( 0)1 55( D)1 209( 2 0)2 132( 3)1 198( 0 8)2 132( 2)1 396( 0)1 66( 9)1 198( 2 0)2 132( 2)1 198( 4 4)2 132( 1)1 396( 0)1 66( 5)1 198( 2 0)2 132( 1)1 198( 8 0)2 132( 0)1 396( 0)1 66( 1)1 198( 2 0)2 132( 0)1 198(0 1 6)2 182 23 1154 7248 t +( 5)1 66( 1)1 1482( 9 9 7)3 198( 1)1 75( -)1 57( n)1 69( a)1 69( J)1 69( -)1 57( 2)1 66( 2)1 143( :)1 58( e)1 63( g)1 66( h a n)3 201( c)1 140( t)1 61( s)1 63( a)1 58( L)1 1415(J KL)1 183 21 733 7728 t +cleartomark +showpage +restore +%%EndPage: 15 15 +%%Page: 16 16 +save +mark +16 pagesetup +10 R f +( \))1 67( KL)1 144( J)1 85( \()1 68( I T)2 132( L)1 70( NS)1 122( A)1 68( R)1 70( T)1 1109( 3)1 66( 0)1 79( .)1 53( 1)1 132( n)1 66( o)1 77( i)1 61( s)1 69( r)1 60( e)1 52( V)1 1124( \))1 67( KL)1 144( J)1 85( \()1 68( I T)2 132( L)1 70( NS)1 122( A)1 68(T R)1 131 30 722 480 t +( 1)1 55( D)1 209( 2 1)2 132( 3)1 198( 0 9)2 132( 2)1 396( 1)1 66( 9)1 198( 2 1)2 132( 2)1 198( 4 5)2 132( 1)1 396( 1)1 66( 5)1 198( 2 1)2 132( 1)1 198( 8 1)2 132( 0)1 396( 1)1 66( 1)1 198( 2 1)2 132( 0)1 198(0 1 7)2 182 23 1154 960 t +( 2)1 55( D)1 209( 2 2)2 132( 3)1 198( 1 0)2 132( 2)1 396( 2)1 66( 9)1 198( 2 2)2 132( 2)1 198( 4 6)2 132( 1)1 396( 2)1 66( 5)1 198( 2 2)2 132( 1)1 198( 8 2)2 132( 0)1 396( 2)1 66( 1)1 198( 2 2)2 132( 0)1 198(0 1 8)2 182 23 1154 1080 t +( 3)1 55( D)1 209( 2 3)2 132( 3)1 198( 1 1)2 132( 2)1 396( 3)1 66( 9)1 198( 2 3)2 132( 2)1 198( 4 7)2 132( 1)1 396( 3)1 66( 5)1 198( 2 3)2 132( 1)1 198( 8 3)2 132( 0)1 396( 3)1 66( 1)1 198( 2 3)2 132( 0)1 198(0 1 9)2 182 23 1154 1200 t +( 4)1 55( D)1 209( 2 4)2 132( 3)1 198( 1 2)2 132( 2)1 396( 4)1 66( 9)1 198( 2 4)2 132( 2)1 198( 4 8)2 132( 1)1 396( 4)1 66( 5)1 198( 2 4)2 132( 1)1 198( 8 4)2 132( 0)1 396( 4)1 66( 1)1 198( 2 4)2 132( 0)1 198(0 2 0)2 182 23 1154 1320 t +( 5)1 55( D)1 209( 2 5)2 132( 3)1 198( 1 3)2 132( 2)1 396( 5)1 66( 9)1 198( 2 5)2 132( 2)1 198( 4 9)2 132( 1)1 396( 5)1 66( 5)1 198( 2 5)2 132( 1)1 198( 8 5)2 132( 0)1 396( 5)1 66( 1)1 198( 2 5)2 132( 0)1 198(0 2 1)2 182 23 1154 1440 t +( 6)1 55( D)1 209( 2 6)2 132( 3)1 198( 1 4)2 132( 2)1 396( 6)1 66( 9)1 198( 2 6)2 132( 2)1 198( 5 0)2 132( 1)1 396( 6)1 66( 5)1 198( 2 6)2 132( 1)1 198( 8 6)2 132( 0)1 396( 6)1 66( 1)1 198( 2 6)2 132( 0)1 198(0 2 2)2 182 23 1154 1560 t +( 7)1 55( D)1 209( 2 7)2 132( 3)1 198( 1 5)2 132( 2)1 396( 7)1 66( 9)1 198( 2 7)2 132( 2)1 198( 5 1)2 132( 1)1 396( 7)1 66( 5)1 198( 2 7)2 132( 1)1 198( 8 7)2 132( 0)1 396( 7)1 66( 1)1 198( 2 7)2 132( 0)1 198(0 2 3)2 182 23 1154 1680 t +( 8)1 55( D)1 209( 3 0)2 132( 3)1 198( 1 6)2 132( 2)1 396( 8)1 66( 9)1 198( 3 0)2 132( 2)1 198( 5 2)2 132( 1)1 396( 8)1 66( 5)1 198( 3 0)2 132( 1)1 198( 8 8)2 132( 0)1 396( 8)1 66( 1)1 198( 3 0)2 132( 0)1 198(0 2 4)2 182 23 1154 1800 t +( 9)1 55( D)1 209( 3 1)2 132( 3)1 198( 1 7)2 132( 2)1 396( 9)1 66( 9)1 198( 3 1)2 132( 2)1 198( 5 3)2 132( 1)1 396( 9)1 66( 5)1 198( 3 1)2 132( 1)1 198( 8 9)2 132( 0)1 396( 9)1 66( 1)1 198( 3 1)2 132( 0)1 198(0 2 5)2 182 23 1154 1920 t +( A)1 66( D)1 209( 3 2)2 132( 3)1 198( 1 8)2 132( 2)1 385( A)1 77( 9)1 198( 3 2)2 132( 2)1 198( 5 4)2 132( 1)1 385( A)1 77( 5)1 198( 3 2)2 132( 1)1 198( 9 0)2 132( 0)1 385( A)1 77( 1)1 198( 3 2)2 132( 0)1 198(0 2 6)2 182 23 1154 2040 t +( B)1 64( D)1 209( 3 3)2 132( 3)1 198( 1 9)2 132( 2)1 387( B)1 75( 9)1 198( 3 3)2 132( 2)1 198( 5 5)2 132( 1)1 387( B)1 75( 5)1 198( 3 3)2 132( 1)1 198( 9 1)2 132( 0)1 387( B)1 75( 1)1 198( 3 3)2 132( 0)1 198(0 2 7)2 182 23 1154 2160 t +( C)1 64( D)1 209( 3 4)2 132( 3)1 198( 2 0)2 132( 2)1 387( C)1 75( 9)1 198( 3 4)2 132( 2)1 198( 5 6)2 132( 1)1 387( C)1 75( 5)1 198( 3 4)2 132( 1)1 198( 9 2)2 132( 0)1 387( C)1 75( 1)1 198( 3 4)2 132( 0)1 198(0 2 8)2 182 23 1154 2280 t +( D)1 66( D)1 209( 3 5)2 132( 3)1 198( 2 1)2 132( 2)1 385( D)1 77( 9)1 198( 3 5)2 132( 2)1 198( 5 7)2 132( 1)1 385( D)1 77( 5)1 198( 3 5)2 132( 1)1 198( 9 3)2 132( 0)1 385( D)1 77( 1)1 198( 3 5)2 132( 0)1 198(0 2 9)2 182 23 1154 2400 t +( DE)1 270( 3 6)2 132( 3)1 198( 2 2)2 132( 2)1 391( E)1 71( 9)1 198( 3 6)2 132( 2)1 198( 5 8)2 132( 1)1 391( E)1 71( 5)1 198( 3 6)2 132( 1)1 198( 9 4)2 132( 0)1 391( E)1 71( 1)1 198( 3 6)2 132( 0)1 198(0 3 0)2 182 22 1154 2520 t +( DF)1 265( 3 7)2 132( 3)1 198( 2 3)2 132( 2)1 393( F)1 69( 9)1 198( 3 7)2 132( 2)1 198( 5 9)2 132( 1)1 393( F)1 69( 5)1 198( 3 7)2 132( 1)1 198( 9 5)2 132( 0)1 393( F)1 69( 1)1 198( 3 7)2 132( 0)1 198(0 3 1)2 182 22 1154 2640 t +( 0)1 61( E)1 203( 4 0)2 132( 3)1 198( 2 4)2 132( 2)1 396( 0)1 55( A)1 209( 4 0)2 132( 2)1 198( 6 0)2 132( 1)1 396( 0)1 66( 6)1 198( 4 0)2 132( 1)1 198( 9 6)2 132( 0)1 396( 0)1 66( 2)1 198( 4 0)2 132( 0)1 198(0 3 2)2 182 23 1154 2760 t +( 1)1 61( E)1 203( 4 1)2 132( 3)1 198( 2 5)2 132( 2)1 396( 1)1 55( A)1 209( 4 1)2 132( 2)1 198( 6 1)2 132( 1)1 396( 1)1 66( 6)1 198( 4 1)2 132( 1)1 198( 9 7)2 132( 0)1 396( 1)1 66( 2)1 198( 4 1)2 132( 0)1 198(0 3 3)2 182 23 1154 2880 t +( 2)1 61( E)1 203( 4 2)2 132( 3)1 198( 2 6)2 132( 2)1 396( 2)1 55( A)1 209( 4 2)2 132( 2)1 198( 6 2)2 132( 1)1 396( 2)1 66( 6)1 198( 4 2)2 132( 1)1 198( 9 8)2 132( 0)1 396( 2)1 66( 2)1 198( 4 2)2 132( 0)1 198(0 3 4)2 182 23 1154 3000 t +( 3)1 61( E)1 203( 4 3)2 132( 3)1 198( 2 7)2 132( 2)1 396( 3)1 55( A)1 209( 4 3)2 132( 2)1 198( 6 3)2 132( 1)1 396( 3)1 66( 6)1 198( 4 3)2 132( 1)1 198( 9 9)2 132( 0)1 396( 3)1 66( 2)1 198( 4 3)2 132( 0)1 198(0 3 5)2 182 23 1154 3120 t +( 4)1 61( E)1 203( 4 4)2 132( 3)1 198( 2 8)2 132( 2)1 396( 4)1 55( A)1 209( 4 4)2 132( 2)1 198( 6 4)2 132( 1)1 396( 4)1 66( 6)1 198( 4 4)2 132( 1)1 198( 0 0)2 132( 1)1 396( 4)1 66( 2)1 198( 4 4)2 132( 0)1 198(0 3 6)2 182 23 1154 3240 t +( 5)1 61( E)1 203( 4 5)2 132( 3)1 198( 2 9)2 132( 2)1 396( 5)1 55( A)1 209( 4 5)2 132( 2)1 198( 6 5)2 132( 1)1 396( 5)1 66( 6)1 198( 4 5)2 132( 1)1 198( 0 1)2 132( 1)1 396( 5)1 66( 2)1 198( 4 5)2 132( 0)1 198(0 3 7)2 182 23 1154 3360 t +( 6)1 61( E)1 203( 4 6)2 132( 3)1 198( 3 0)2 132( 2)1 396( 6)1 55( A)1 209( 4 6)2 132( 2)1 198( 6 6)2 132( 1)1 396( 6)1 66( 6)1 198( 4 6)2 132( 1)1 198( 0 2)2 132( 1)1 396( 6)1 66( 2)1 198( 4 6)2 132( 0)1 198(0 3 8)2 182 23 1154 3480 t +( 7)1 61( E)1 203( 4 7)2 132( 3)1 198( 3 1)2 132( 2)1 396( 7)1 55( A)1 209( 4 7)2 132( 2)1 198( 6 7)2 132( 1)1 396( 7)1 66( 6)1 198( 4 7)2 132( 1)1 198( 0 3)2 132( 1)1 396( 7)1 66( 2)1 198( 4 7)2 132( 0)1 198(0 3 9)2 182 23 1154 3600 t +( 8)1 61( E)1 203( 5 0)2 132( 3)1 198( 3 2)2 132( 2)1 396( 8)1 55( A)1 209( 5 0)2 132( 2)1 198( 6 8)2 132( 1)1 396( 8)1 66( 6)1 198( 5 0)2 132( 1)1 198( 0 4)2 132( 1)1 396( 8)1 66( 2)1 198( 5 0)2 132( 0)1 198(0 4 0)2 182 23 1154 3720 t +( 9)1 61( E)1 203( 5 1)2 132( 3)1 198( 3 3)2 132( 2)1 396( 9)1 55( A)1 209( 5 1)2 132( 2)1 198( 6 9)2 132( 1)1 396( 9)1 66( 6)1 198( 5 1)2 132( 1)1 198( 0 5)2 132( 1)1 396( 9)1 66( 2)1 198( 5 1)2 132( 0)1 198(0 4 1)2 182 23 1154 3840 t +( EA)1 275( 5 2)2 132( 3)1 198( 3 4)2 132( 2)1 385( A)1 66( A)1 209( 5 2)2 132( 2)1 198( 7 0)2 132( 1)1 385( A)1 77( 6)1 198( 5 2)2 132( 1)1 198( 0 6)2 132( 1)1 385( A)1 77( 2)1 198( 5 2)2 132( 0)1 198(0 4 2)2 182 22 1154 3960 t +( B)1 70( E)1 203( 5 3)2 132( 3)1 198( 3 5)2 132( 2)1 387( B)1 64( A)1 209( 5 3)2 132( 2)1 198( 7 1)2 132( 1)1 387( B)1 75( 6)1 198( 5 3)2 132( 1)1 198( 0 7)2 132( 1)1 387( B)1 75( 2)1 198( 5 3)2 132( 0)1 198(0 4 3)2 182 23 1154 4080 t +( C)1 70( E)1 203( 5 4)2 132( 3)1 198( 3 6)2 132( 2)1 387( C)1 64( A)1 209( 5 4)2 132( 2)1 198( 7 2)2 132( 1)1 387( C)1 75( 6)1 198( 5 4)2 132( 1)1 198( 0 8)2 132( 1)1 387( C)1 75( 2)1 198( 5 4)2 132( 0)1 198(0 4 4)2 182 23 1154 4200 t +( ED)1 275( 5 5)2 132( 3)1 198( 3 7)2 132( 2)1 385( D)1 66( A)1 209( 5 5)2 132( 2)1 198( 7 3)2 132( 1)1 385( D)1 77( 6)1 198( 5 5)2 132( 1)1 198( 0 9)2 132( 1)1 385( D)1 77( 2)1 198( 5 5)2 132( 0)1 198(0 4 5)2 182 22 1154 4320 t +( E)1 66( E)1 203( 5 6)2 132( 3)1 198( 3 8)2 132( 2)1 390( AE)1 270( 5 6)2 132( 2)1 198( 7 4)2 132( 1)1 391( E)1 71( 6)1 198( 5 6)2 132( 1)1 198( 1 0)2 132( 1)1 391( E)1 71( 2)1 198( 5 6)2 132( 0)1 198(0 4 6)2 182 22 1154 4440 t +( F)1 64( E)1 203( 5 7)2 132( 3)1 198( 3 9)2 132( 2)1 395( AF)1 265( 5 7)2 132( 2)1 198( 7 5)2 132( 1)1 393( F)1 69( 6)1 198( 5 7)2 132( 1)1 198( 1 1)2 132( 1)1 393( F)1 69( 2)1 198( 5 7)2 132( 0)1 198(0 4 7)2 182 22 1154 4560 t +( 0)1 63( F)1 201( 6 0)2 132( 3)1 198( 4 0)2 132( 2)1 396( 0)1 57( B)1 207( 6 0)2 132( 2)1 198( 7 6)2 132( 1)1 396( 0)1 66( 7)1 198( 6 0)2 132( 1)1 198( 1 2)2 132( 1)1 396( 0)1 66( 3)1 198( 6 0)2 132( 0)1 198(0 4 8)2 182 23 1154 4680 t +( 1)1 63( F)1 201( 6 1)2 132( 3)1 198( 4 1)2 132( 2)1 396( 1)1 57( B)1 207( 6 1)2 132( 2)1 198( 7 7)2 132( 1)1 396( 1)1 66( 7)1 198( 6 1)2 132( 1)1 198( 1 3)2 132( 1)1 396( 1)1 66( 3)1 198( 6 1)2 132( 0)1 198(0 4 9)2 182 23 1154 4800 t +( 2)1 63( F)1 201( 6 2)2 132( 3)1 198( 4 2)2 132( 2)1 396( 2)1 57( B)1 207( 6 2)2 132( 2)1 198( 7 8)2 132( 1)1 396( 2)1 66( 7)1 198( 6 2)2 132( 1)1 198( 1 4)2 132( 1)1 396( 2)1 66( 3)1 198( 6 2)2 132( 0)1 198(0 5 0)2 182 23 1154 4920 t +( 3)1 63( F)1 201( 6 3)2 132( 3)1 198( 4 3)2 132( 2)1 396( 3)1 57( B)1 207( 6 3)2 132( 2)1 198( 7 9)2 132( 1)1 396( 3)1 66( 7)1 198( 6 3)2 132( 1)1 198( 1 5)2 132( 1)1 396( 3)1 66( 3)1 198( 6 3)2 132( 0)1 198(0 5 1)2 182 23 1154 5040 t +( 4)1 63( F)1 201( 6 4)2 132( 3)1 198( 4 4)2 132( 2)1 396( 4)1 57( B)1 207( 6 4)2 132( 2)1 198( 8 0)2 132( 1)1 396( 4)1 66( 7)1 198( 6 4)2 132( 1)1 198( 1 6)2 132( 1)1 396( 4)1 66( 3)1 198( 6 4)2 132( 0)1 198(0 5 2)2 182 23 1154 5160 t +( 5)1 63( F)1 201( 6 5)2 132( 3)1 198( 4 5)2 132( 2)1 396( 5)1 57( B)1 207( 6 5)2 132( 2)1 198( 8 1)2 132( 1)1 396( 5)1 66( 7)1 198( 6 5)2 132( 1)1 198( 1 7)2 132( 1)1 396( 5)1 66( 3)1 198( 6 5)2 132( 0)1 198(0 5 3)2 182 23 1154 5280 t +( 6)1 63( F)1 201( 6 6)2 132( 3)1 198( 4 6)2 132( 2)1 396( 6)1 57( B)1 207( 6 6)2 132( 2)1 198( 8 2)2 132( 1)1 396( 6)1 66( 7)1 198( 6 6)2 132( 1)1 198( 1 8)2 132( 1)1 396( 6)1 66( 3)1 198( 6 6)2 132( 0)1 198(0 5 4)2 182 23 1154 5400 t +( 7)1 63( F)1 201( 6 7)2 132( 3)1 198( 4 7)2 132( 2)1 396( 7)1 57( B)1 207( 6 7)2 132( 2)1 198( 8 3)2 132( 1)1 396( 7)1 66( 7)1 198( 6 7)2 132( 1)1 198( 1 9)2 132( 1)1 396( 7)1 66( 3)1 198( 6 7)2 132( 0)1 198(0 5 5)2 182 23 1154 5520 t +( 8)1 63( F)1 201( 7 0)2 132( 3)1 198( 4 8)2 132( 2)1 396( 8)1 57( B)1 207( 7 0)2 132( 2)1 198( 8 4)2 132( 1)1 396( 8)1 66( 7)1 198( 7 0)2 132( 1)1 198( 2 0)2 132( 1)1 396( 8)1 66( 3)1 198( 7 0)2 132( 0)1 198(0 5 6)2 182 23 1154 5640 t +( 9)1 63( F)1 201( 7 1)2 132( 3)1 198( 4 9)2 132( 2)1 396( 9)1 57( B)1 207( 7 1)2 132( 2)1 198( 8 5)2 132( 1)1 396( 9)1 66( 7)1 198( 7 1)2 132( 1)1 198( 2 1)2 132( 1)1 396( 9)1 66( 3)1 198( 7 1)2 132( 0)1 198(0 5 7)2 182 23 1154 5760 t +( FA)1 273( 7 2)2 132( 3)1 198( 5 0)2 132( 2)1 385( A)1 68( B)1 207( 7 2)2 132( 2)1 198( 8 6)2 132( 1)1 385( A)1 77( 7)1 198( 7 2)2 132( 1)1 198( 2 2)2 132( 1)1 385( A)1 77( 3)1 198( 7 2)2 132( 0)1 198(0 5 8)2 182 22 1154 5880 t +( B)1 72( F)1 201( 7 3)2 132( 3)1 198( 5 1)2 132( 2)1 386( BB)1 274( 7 3)2 132( 2)1 198( 8 7)2 132( 1)1 387( B)1 75( 7)1 198( 7 3)2 132( 1)1 198( 2 3)2 132( 1)1 387( B)1 75( 3)1 198( 7 3)2 132( 0)1 198(0 5 9)2 182 22 1154 6000 t +( C)1 72( F)1 201( 7 4)2 132( 3)1 198( 5 2)2 132( 2)1 386( BC)1 274( 7 4)2 132( 2)1 198( 8 8)2 132( 1)1 387( C)1 75( 7)1 198( 7 4)2 132( 1)1 198( 2 4)2 132( 1)1 387( C)1 75( 3)1 198( 7 4)2 132( 0)1 198(0 6 0)2 182 22 1154 6120 t +( FD)1 273( 7 5)2 132( 3)1 198( 5 3)2 132( 2)1 385( D)1 68( B)1 207( 7 5)2 132( 2)1 198( 8 9)2 132( 1)1 385( D)1 77( 7)1 198( 7 5)2 132( 1)1 198( 2 5)2 132( 1)1 385( D)1 77( 3)1 198( 7 5)2 132( 0)1 198(0 6 1)2 182 22 1154 6240 t +( E)1 68( F)1 201( 7 6)2 132( 3)1 198( 5 4)2 132( 2)1 392( BE)1 268( 7 6)2 132( 2)1 198( 9 0)2 132( 1)1 391( E)1 71( 7)1 198( 7 6)2 132( 1)1 198( 2 6)2 132( 1)1 391( E)1 71( 3)1 198( 7 6)2 132( 0)1 198(0 6 2)2 182 22 1154 6360 t +( F)1 66( F)1 201( 7 7)2 132( 3)1 198( 5 5)2 132( 2)1 393( F)1 60( B)1 207( 7 7)2 132( 2)1 198( 9 1)2 132( 1)1 393( F)1 69( 7)1 198( 7 7)2 132( 1)1 198( 2 7)2 132( 1)1 393( F)1 69( 3)1 198( 7 7)2 132( 0)1 198(0 6 3)2 182 23 1154 6480 t +9 B f +(INSTALLATION)720 6888 w +10 R f +( source form. It was tried under UN)7 1508(Program is given in a)4 899 2 1080 7008 t +10 S f +(*)3487 7008 w +10 R f +(X, VMS and MS-DOS systems and ran. The)7 1863 1 3537 7008 t +(\256le)1080 7128 w +10 I f +(readme.doc)1244 7128 w +10 R f +( \256le from)2 392(contains the details on how to obtain the whole package. You can retrieve this)13 3260 2 1748 7128 t +( can also obtain it via e-mail)6 1192( You)1 240( kekule.osc.edu in the directory /pub/russian/translit.)5 2148(anonymous ftp on)2 740 4 1080 7248 t +( 16)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7728 t +cleartomark +showpage +restore +%%EndPage: 16 16 +%%Page: 17 17 +save +mark +17 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(by sending a message:)3 920 1 1080 960 t +(get translit/readme.doc from russian)3 1466 1 1280 1080 t +(to OSCPOST)1 551 1 1080 1200 t +10 S1 f +(@)1631 1200 w +10 R f +(osc.edu or OSCPOST)2 891 1 1723 1200 t +10 S1 f +(@)2614 1200 w +10 R f +(OHSTPY.BITNET.)2706 1200 w +(The source of the program consists of several \256les:)8 2099 1 1080 1440 t +10 I f +(paths.h)1080 1608 w +10 R f +( It contains its own comments what to do. The de\256nes in this)12 2538(must be edited before compilation.)4 1422 2 1440 1608 t +( you are using and the default path for searching transliteration)10 2586(\256le relate to the operating system)5 1374 2 1440 1728 t +(table.)1440 1848 w +10 I f +(translit.c)1080 2016 w +10 R f +( was intended to be a portable code.)7 1486( This)1 244(It contains the main program.)4 1211 3 1440 2136 t +10 I f +(reg)1080 2304 w +10 S f +(_)1213 2304 w +10 I f +(exp.h)1263 2304 w +10 R f +( the University of)3 732(the include \256le for regular expression matching library of Henry Spencer from)11 3228 2 1440 2424 t +( Also 4)2 315(Toronto. This regular expression package was posted to comp.sources.misc \(volume 3\).)10 3645 2 1440 2544 t +( the patches to the original code and)7 1579(patches were posted \(in volumes: 3, 4, 4, 10\). I applied)10 2381 2 1440 2664 t +(made small modi\256cations to the code, which are marked in the source code.)12 3124 1 1440 2784 t +10 I f +(reg)1080 2952 w +10 S f +(_)1213 2952 w +10 I f +(exp.c)1263 2952 w +10 R f +(the regular expression library for compilation and matching of regular expressions.)10 3393 1 1440 3072 t +10 I f +(reg)1080 3240 w +10 S f +(_)1213 3240 w +10 I f +(sub.c)1263 3240 w +10 R f +(the regular expression substitution routine.)4 1739 1 1440 3360 t +( to edit)2 296(Before you compile this program you have)6 1762 2 1080 3648 t +10 I f +(paths.h)3172 3648 w +10 R f +( compila-)1 389( During)1 350( comments in the \256le.)4 900(. Read)1 297 4 3464 3648 t +(tion, all source code should reside in the current directory.)9 2398 1 1080 3768 t +(Then you may compile the program under UN)7 1911 1 1080 3888 t +10 S f +(*)2991 3888 w +10 R f +(X as \(for example\):)3 802 1 3041 3888 t +(cc -o translit translit.c reg)4 1055 1 1280 4008 t +10 S f +(_)2335 4008 w +10 R f +(exp.c reg)1 373 1 2385 4008 t +10 S f +(_)2758 4008 w +10 R f +(sub.c)2808 4008 w +(and copy the program)3 984 1 1080 4128 t +10 I f +(translit)2126 4128 w +10 R f +( example:)1 429(to some standard directory which is in users' path \(for)9 2493 2 2478 4128 t +( copy transliteration tables to the directory which you have chosen in)11 2941(/usr/local/bin\). Then you need to)4 1379 2 1080 4248 t +10 I f +(paths.h)1080 4368 w +10 R f +( \(with all the gory details:)5 1085( you get errors, then it is not OK. Please, report them to the author)14 2784(. If)1 159 3 1372 4368 t +(error message, line number, machine, operating system, etc.\).)7 2509 1 1080 4488 t +(Under VMS \(VAXes\) you need to compile it as:)8 2000 1 1080 4728 t +(cc translit)1 399 1 1280 4848 t +(cc reg)1 248 1 1280 4968 t +10 S f +(_)1528 4968 w +10 R f +(exp)1578 4968 w +(cc reg)1 248 1 1280 5088 t +10 S f +(_)1528 5088 w +10 R f +(sub)1578 5088 w +(link translit+reg)1 650 1 1280 5208 t +10 S f +(_)1930 5208 w +10 R f +(exp+reg)1980 5208 w +10 S f +(_)2307 5208 w +10 R f +(sub,sys$library:vaxcrtl/lib)2357 5208 w +(and before you can use the program, you need to type \(or better put into your LOGIN.COM \256le\) a line:)19 4275 1 1080 5328 t +(translit ==)1 423 1 1280 5448 t +10 S1 f +(")1736 5448 w +10 R f +($SYS$USER:[ME.TRA]TRANSLIT.EXE)1777 5448 w +10 S1 f +(")3488 5448 w +10 R f +(or whatever is the full path to the)7 1463 1 1080 5568 t +10 I f +(translit)2588 5568 w +10 R f +(executable image which you created with LINK. Note the)8 2476 1 2924 5568 t +(quotes and the $ sign in front of program path.)9 1931 1 1080 5688 t +(On an IBM-PC I used MicroSoft C 5.1 as:)8 1755 1 1080 5928 t +(cl /FeTRANSLIT /AL /FPc /W1 /F 5000 /Ox /Gs translit.c reg)10 2577 1 1180 6048 t +10 S f +(_)3757 6048 w +10 R f +(exp.c reg)1 373 1 3807 6048 t +10 S f +(_)4180 6048 w +10 R f +(sub.c)4230 6048 w +9 B f +(RULES, CONDITIONS AND AUTHOR'S WHISHES)4 2178 1 720 6456 t +10 R f +(You can distribute this code and associated \256les under these conditions:)10 2949 1 1080 6576 t +( \(even if you think that they are garbage\). You may get the com-)13 2793(1\) You will distribute all \256les)5 1261 2 1346 6696 t +( the)1 165(plete set from anonymous ftp at kekule.osc.edu in /pub/russian/translit. You can also get)12 3755 2 1480 6816 t +( distribution send a)3 815(program and associated \256les via e-mail. To get the instructions for e-mail)11 3105 2 1480 6936 t +(line:)1480 7056 w +(send translit/readme.doc from russian)3 1527 1 1711 7176 t +(to OSCPOST)1 559 1 1480 7296 t +10 S1 f +(@)2039 7296 w +10 R f +(osc.edu or OSCPOST)2 907 1 2131 7296 t +10 S1 f +(@)3038 7296 w +10 R f +( not allowed to distribute)4 1068( are)1 162(OHSTPY.BITNET. You)1 1040 3 3130 7296 t +( 17)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7776 t +cleartomark +showpage +restore +%%EndPage: 17 17 +%%Page: 18 18 +save +mark +18 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(the incomplete distribution. The following \256les should be present in the distribution:)11 3466 1 1480 960 t +( ALT to GOSTCII table)4 992(alt-gos.rus -)1 933 2 1680 1080 t +( ALT to KOI8 table)4 825(alt-koi8.rus -)1 933 2 1680 1200 t +( uuencoded example in ALT)4 1174(example.alt.uu -)1 933 2 1680 1320 t +( uuencoded example in KOI8)4 1207(example.ko8.uu -)1 933 2 1680 1440 t +( phonetic transliteration example)3 1336(example.pho -)1 933 2 1680 1560 t +( LaTeX example)2 686(example.tex -)1 933 2 1680 1680 t +( GOSTCII to ALT table)4 992(gos-alt.rus -)1 933 2 1680 1800 t +( GOSTCII to KOI8 table)4 1025(gos-koi8.rus -)1 933 2 1680 1920 t +( KOI7 to KOI8 table)4 858(koi7-8.rus -)1 933 2 1680 2040 t +( KOI7 \(no Latin\) to KOI8 table)6 1301(koi7nl-8.rus -)1 933 2 1680 2160 t +( KOI8 to KOI7 table)4 858(koi8-7.rus -)1 933 2 1680 2280 t +( KOI8 to ALT table)4 825(koi8-alt.rus -)1 933 2 1680 2400 t +( KOI8 to GOSTCII table)4 1025(koi8-gos.rus -)1 933 2 1680 2520 t +( KOI8 to Library of Congress table)6 1451(koi8-lc.rus -)1 933 2 1680 2640 t +( KOI8 to GOST transliteration)4 1253(koi8-phg.rus -)1 933 2 1680 2760 t +( KOI8 to Pokrovsky transliteration)4 1420(koi8-php.rus -)1 933 2 1680 2880 t +( KOI8 to LaTeX conversion)4 1157(koi8-ltx.rus -)1 933 2 1680 3000 t +( KOI8 to Plain TeX conversion)5 1291(koi8-tex.rus -)1 933 2 1680 3120 t +( Order form for ordering the program)6 1538(order.txt -)1 933 2 1680 3240 t +( Include \256le for translit.c)4 1022(paths.h -)1 933 2 1680 3360 t +( GOST transliteration to KOI8)4 1253(phg-koi8.rus -)1 933 2 1680 3480 t +( Simple phonetic to KOI8)4 1065(pho-8sim.rus -)1 933 2 1680 3600 t +( Various phonetic to KOI8)4 1097(pho-koi8.rus -)1 933 2 1680 3720 t +( Pokrovsky to KOI8)3 832(php-koi8.rus -)1 933 2 1680 3840 t +( short description of the \256les)5 1181(readme.doc -)1 933 2 1680 3960 t +(reg)1680 4080 w +10 S f +(_)1807 4080 w +10 R f +( regular expression code by Henry Spencer)6 1765(exp.c -)1 756 2 1857 4080 t +(reg)1680 4200 w +10 S f +(_)1807 4200 w +10 R f +( include for reg)3 636(exp.h -)1 756 2 1857 4200 t +10 S f +(_)3249 4200 w +10 R f +(exp.c and reg)2 550 1 3299 4200 t +10 S f +(_)3849 4200 w +10 R f +(sub.c)3899 4200 w +(reg)1680 4320 w +10 S f +(_)1807 4320 w +10 R f +( regular expression code by H. Spencer)6 1613(sub.c -)1 756 2 1857 4320 t +( LaTeX to KOI8)3 686(ltx-koi8.rus -)1 933 2 1680 4440 t +( TRANSLIT main program)3 1120(translit.c -)1 933 2 1680 4560 t +( TRANSLIT manual in PostScript)4 1399(translit.ps -)1 933 2 1680 4680 t +( TRANSLIT manual in)3 954(translit.1 -)1 933 2 1680 4800 t +10 S f +(*)3600 4800 w +10 R f +(roff)3650 4800 w +( Plain ASCII TRANSLIT manual)4 1376(translit.txt -)1 933 2 1680 4920 t +( that)1 191(2\) You may expand/change the \256les and the program and distribute modi\256ed \256les, provided)13 3863 2 1346 5160 t +( unnecessary portions out\) and clearly)5 1556(you do not delete anything \(you can always comment the)9 2364 2 1480 5280 t +( author, though you are)4 969(mark your changes. Please send the copy of the modi\256ed version to the)12 2951 2 1480 5400 t +( for your enhancements. I simply wish that)7 1779( will give you all the credit)6 1143( I)1 102(not required to do so.)4 896 4 1480 5520 t +( of distribution for this code, so it is maintained to some extent. If you)14 3009(there is a single point)4 911 2 1480 5640 t +( you may. I)3 506(create additional transliteration de\256nition \256les, please, send them to the author if)11 3414 2 1480 5760 t +( the program distribution. I want to \256x bugs and expand/optimize this code,)12 3219(will add them to)3 701 2 1480 5880 t +( do not know or do)5 798( need your transliteration \256les for languages which I)8 2157( I)1 100(but I need your help.)4 865 4 1480 6000 t +( improving documentation are most welcome \(I am not)8 2283( suggestions for)2 651( Your)1 272(not use currently.)2 714 4 1480 6120 t +(a native English speaker\).)3 1055 1 1480 6240 t +( money for the program and/or associated \256les, except for media and copy-)12 3164(3\) You will not charge)4 956 2 1280 6360 t +( \256rst. Bear in mind that the regular expres-)8 1804(ing costs. If you want to sell it, contact the author)10 2116 2 1480 6480 t +( there are other regular)4 987( But)1 222(sion package by Henry Spencer has some copyright restrictions.)8 2711 3 1480 6600 t +( violated by this offer-)4 933(expression packages which do not have these restrictions \(which are not)10 2987 2 1480 6720 t +(ing\).)1480 6840 w +( advice on compiling this software and try to \256x bugs when time)12 2828(4\) I will gladly help you with)6 1292 2 1280 6960 t +( to run executable, you need to order it for a very nomi-)12 2352(allows. However, if you want a ready)6 1568 2 1480 7080 t +(nal fee from)2 511 1 1480 7200 t +10 I f +(JKL ENTERPRISES, INC.)2 1082 1 2028 7200 t +10 R f +(as described in the \256le)4 945 1 3148 7200 t +10 I f +(order.txt)4131 7200 w +10 R f +(which must be a part)4 884 1 4516 7200 t +( 18)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 18 18 +%%Page: 19 19 +save +mark +19 pagesetup +10 R f +( \( JKL \))3 286( TRANSLIT)1 1792( 1.03)1 208( Version)1 1625(TRANSLIT \( JKL \))3 769 5 720 480 t +(of a complete distribution.)3 1079 1 1480 960 t +9 B f +(AUTHOR)720 1248 w +10 R f +( jkl)1 195( E-mail:)1 422(Jan Labanowski, P.O. Box 21821, Columbus, OH 43221-0821, USA.)8 3284 3 1080 1368 t +10 S1 f +(@)4981 1368 w +10 R f +(osc.edu,)5073 1368 w +(JKL)1080 1488 w +10 S1 f +(@)1252 1488 w +10 R f +(OHSTPY.BITNET.)1344 1488 w +( 19)1 1817( change: 22-Jan-1997)2 875(JKL Last)1 1988 3 720 7680 t +cleartomark +showpage +restore +%%EndPage: 19 19 +%%Trailer +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 19 diff --git a/support/translit/translit.txt b/support/translit/translit.txt new file mode 100644 index 0000000000..7ab0a09d07 --- /dev/null +++ b/support/translit/translit.txt @@ -0,0 +1,1716 @@ + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + +NAME + TRANSLIT + Program to transliterate texts in different character + sets. The program converts input character codes (or + sequences of codes) to a different set of output char- + acter codes (or sequences of codes). Intended for + transliteration to/from phonetic representation of + foreign letters with Latin letters from/to special + national codes used for these letters. It supports + simple matches, character lists and flexible matches + via regular expressions. The new transliteration + schemes are easily added by creating simple transli- + teration tables. Multiple character sets are supported + for input and output. It does not yet support UNICODE, + but some day it will. + + +COPYRIGHT + Copyright (c) 1993 Jan Labanowski and JKL Enterprises, Inc. + You may distribute the Software only as a complete set of + files. You may distribute the modified Software only if you + retain the Copyright notice and you do not delete original + code, data, documentation and associated files. The + Software is copyrighted. You may not sell the software or + incorporate it in the commercial product without written + permission from Jan Labanowski or JKL Enterprises, Inc. You + are allowed to charge for media and copying if you distri- + bute the whole unaltered package. + + +SYNOPSIS + translit [ -i inpfile ][ -o outfile ][ -d ][ -t transtbl | + transtbl ] + + +OPTIONS + -i inpfile + inpfile is a name of input file to be transliterated. + If "-i" is not specified, the input is taken from stan- + dard input. + + -o outfile + outfile is an output file, where the transliterated + text is stored. If "-o" is not specified, the output + is directed to the standard output. Program will not + overwrite the existing file. If file exists, you need + to delete it first. + + -d Some information on character codes read from transli- + teration table file are sent to standard error + ("stderr"). Useful when developing new transliteration + tables. + + + +JKL Last change: 22-Jan-1997 1 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + -t transtbl + transtbl is a transliteration table file which you want + to use. The "-t" option may be omitted if the transtbl + is specified as the last parameter on the command line. + The program first tries to locate transtbl file in the + current directory, and if not found, it searches the + directory chosen at compilation/installation time in + "paths.h". If no "transtbl" is given, the default file + name specified in "paths.h" is taken. The + compile/installation time defaults in "paths.h" for the + search directory and the default file name can be + overiden by setting environment variables: TRANSP and + TRANSF, respectively (see below). + + +ENVIRONMENT VARIABLES + The default path to the directory holding transliteration + tables can be overiden by setting environment variable + TRANSP. The default name for the transliteration table can + be overiden by setting TRANSF environment variable. However, + when the transliteration file is given on the command line, + it will overide the defaults and environment setting. Here + are some examples of setting environment variables for dif- + ferent operating systems: + + UN*X System + If you are using csh (C-shell): + setenv TRANSP /home/john/translit/ + setenv TRANSF koi8-tex.rus + If you are using sh (Bourne Shell): + set TRANSP=/home/john/translit/ + export TRANSP + set TRANSF=koi8-tex.rus + export TRANSF + VAX-VMS System + TRANSP:==SYS$USER:[JOHN.TRANSLIT] + TRANSF:==KOI8-TEX.TBL + PC-DOS or MS-DOS + SET TRANSP=C:\JOHN\TRANSLIT\ + SET TRANSF=KOI8-TEX.TBL + Note that the directory path has to include concluding + slashes, \ or /. + + + +EXAMPLES + cat text.koi8 | translit koi8-tex.rus > text.tex + in UN*X is equivalent to: + + translit -t koi8-tex.rus -o text.tex -i text.koi8 + and converts file text.koi8 to file text.tex using transli- + teration specified in the file koi8-tex.rus. + + + +JKL Last change: 22-Jan-1997 2 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + translit -i text.koi8 koi8-cl.rus + displays the converted text from file text.koi8 on your ter- + minal. The conversion table is koi8-cl.rus (KOI8 --> Library + of Congress). + + translit -i text.alt -t alt-koi8.rus | translit -o + text.tex -t koi8-tex.rus + is essentially equivalent to the following two commands in + UN*X or MS-DOS: + translit -i text.alt -o junkfile -t alt-koi8.rus + translit -i junkfile -o text.tex -t koi8-ltx.rus + and converts the file in ALT character set to a LaTeX file + for printing. + + translit -i russ.txt pho-koi8.rus | translit -o + russ.tex koi8-ltx.rus + converts file russ.txt from phonetic transliteration to + LaTeX file russ.tex for printing. + + + + +TRANSLITERATION TABLES + The following transliteration files are available with the + current distribution. Consult the comments in the individual + files for details. + + koi8-tex.rus + Conversion table which changes the file in KOI8 (8 bit + character set used by RELCOM news service) to a Plain + TeX file for printing with AMS WNCYR fonts. + + koi8-ltx.rus + Conversion table which changes the file in KOI8 (8 bit + character set used by RELCOM news service) to LaTeX + file for printing with AMS WNCYR fonts. + + ltx-koi8.rus + Conversion table for the LaTeX to KOI8 conversion. Note + that it will not handle complicated cases, since LaTeX + is a program, and only TeX can convert a LaTeX source + to the characters. However, it should work OK for sim- + ple cases of text only files, and may need some editing + for complicated cases. + + k8-tavtt.rus + Converts KOI8 to Bill Tavolga cyrttf truetype font map- + ping. + + hex-text.rus + Converts hexcodes to actual codes. Some e-mail programs + convert characters with codes larger than 127 to + + + +JKL Last change: 22-Jan-1997 3 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + hexadecimal numbers like =AB, =9C, etc. This table + converts hexadecimal numbers back to codes. + + alt-gos.rus + This is a transliteration data file for converting from + ALT (Bryabrins alternativnyj variant used in many popu- + lar wordprocessors) to GOSTSCII 84 (approx. ISO-8859- + 5?) + + alt-koi8.rus + This is a transliteration data file for converting from + ALT to KOI8. KOI8 is meant to be GOST 19768-74 (as + used by RELCOM). + + gos-alt.rus + This is a transliteration data file for converting + GOSTSCII 84 (approx. ISO-8859-5?) to ALT (Bryabrins + alternativnyj variant) + + gos-koi8.rus + This is a transliteration data file for converting + GOSTSCII 84 (approx. ISO-8859-5?) to KOI8 used by REL- + COM KOI8 is meant to be GOST 19768-74 + + koi8-alt.rus + This is a transliteration data file for converting from + KOI8. KOI8 is meant to be GOST 19768-74, to ALT + (Bryabrins alternativnyj variant) + + koi8-gos.rus + This is a transliteration data file for converting from + KOI8 (Relcom). KOI8 is meant to be GOST 19768-74, to + GOSTSCII 84 (approx. ISO-8859-5) + + koi8-7.rus + This file converts from KOI8 to KOI7. + + koi7-8.rus + This file converts from KOI7 to KOI8. Before you + attempt the conversion, you might need to perform a + simple edit on your file. You MUST read the comments in + koi7-8.rus before you attempt this conversion. + + koi7nl-8.rus + This file assumes that there are only Russian letters + (no Latin) in the input file. If you have Latin + letters, and you inserted SHIFT-OUT/IN characters, use + file koi7-8.rus. + + koi8-lc.rus + This file converts KOI8 to the Library of Congress + transliteration. Some extensions are added. + + + +JKL Last change: 22-Jan-1997 4 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + koi8-php.rus + This file converts KOI8 to the Pokrovsky translitera- + tion. + + php-koi8.rus + This file converts from Pokrovsky transliteration to + KOI8. + + koi8-phg.rus + This file converts from KOI8 to GOST transliteration. + + phg-koi8.rus + This file converts from GOST transliteration to KOI8. + + pho-koi8.rus + This is a table which will convert from many "phonetic" + transliteration schemes to KOI8. It is elaborate and it + takes a lot of time to transliterate the file using + this table. Some transliterations are hopeless and + internally inconsistent (as humans...), so the results + cannot be bug free. You might want to modify the file, + if your transliteration patterns are different than + those assumed in this file. You may also want to sim- + plify this file if the phonetic transliteration you are + converting is a sound one (most are not, e.g., they use + e for je and e oborotnoye, ts for c and t-s, h for kha, + i for i-kratkoe, etc.). + + + +INTRODUCTION + If you do not intend to write your own transliteration + tables, you may skip this description and go directly to the + installation and copyright sections. However, you might want + to read this material anyhow, to better understand the traps + and complexities of transliteration. It is frequently + necessary to transliterate text, i.e., to change one set of + characters (or composite characters, phonemes, etc.) to + another set. + + On computers, the transliteration operation consists of con- + verting the input file in some character set to the output + file in another character set. + + In the simplest case, the single characters are transli- + terated, i.e, their codes are changed according to some + transliteration table. This is called remapping and, assum- + ing the one-to-one mapping, the task can be accomplished by + a simple pseudo program: + new_char_code = character_map[old_char_code]; + + + + + +JKL Last change: 22-Jan-1997 5 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + If the one-to-one correspondence does not exist (i.e., some + codes may be present in one set, but do not have correspond- + ing codes in another set), precise transliteration is not + possible. In such cases there are 3 obvious possibilities: + 1. skip characters which do not have counterparts, + 2. retain unchanged codes of these characters, + 3. convert the codes to multicharacter sequences. + In some cases, the file can contain more than one character + sets, e.g., the file can contain Latin characters (e.g. + English text) and Cyrillic characters (e.g. Russian text). + If the character codes assigned to characters in different + sets do not overlap, this is still a simple mapping problem. + This is a case with KOI8 or GOSTCII character tables for + Russian, which reserve the lower 127 codes for standard + ASCII codes (which include all Latin characters) and charac- + ters with codes above 127 for Cyrillic letters. + + If character codes overlap, there is a SHIFT-OUT/SHIFT-IN + technique in which the meaning of the character sequence is + determined by an opening code (or sequence of characters + codes). In this case, the meaning of the series of charac- + ters is determined by the SHIFT-OUT character (or sequence) + which precedes them. The SHIFT-IN character (or sequence) + following the series of characters returns the "reader" to + the default or previous status. To schemes are used: + (char_set_1)(SHIFT-IN[1])(SHIFT-OUT[2])(char_set_2)... + or + (char_set_1)(SHIFT-OUT[2])(char_set_2)(SHIFT- + OUT[1])char_set_1... + + Since computer keyboards, screens, printers, software, etc., + are by necessity language specific (the most popular being + ASCII), there is a problem of typing foreign language text + which contains letters different than standard Latin alpha- + bet. For this reason, many transliteration schemes use + several Latin letters to represent a single letter of + foreign alphabet, for example: + zh is used to represent cyrillic letter zhe, \"o may be + used to represent the o umlaut, etc. + + If there is one-to-one mapping of such sequences to another + alphabet, it is also easy to process. However, it is neces- + sary to substitute longest sequences first. For example, a + frequently used transliteration for cyrillic letters: + shch --- letter shcza 221 (decimal KOI8 code) + sh --- letter sha 219 + ch --- letter cze 222 + c --- letter tse 195 + h --- letter kha 200 + a --- letter a 193 + + + + + +JKL Last change: 22-Jan-1997 6 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + Obviously, in this case, we should proceed first with con- + verting all shch sequences to shcha letter, then two- + character sh and ch, and then single character c and h. + Generally, for the one-to-one transliteration, the longest + sequences should be precessed first, and the order of + conversion within sequences of the same length makes no + difference. For example, converting the word "shchah" to + KOI8 should proceed in a following way: + shchah --> (221)ah, (221)ah --> (221)(193)h, (221)(193)h + --> (221)(193)(200) + There is a multitude of reasons why transliteration is done. + I wrote this program having in mind the following ones: + 1) to print cyrillic text using TeX/LaTeX and cyrillic + fonts + 2) to read KOI8 encoded messages from Russia on my ASCII + terminal. + However, I was trying to make it flexible to accommodate + other uses. + + +PROGRAM OPERATION + The program converts the input file to an output file using + transliteration rules from the transliteration rule file + which you specify with option -t. Some examples of transli- + teration rule files are enclosed. Before program can be + used, the transliteration rules need to be specified. + + These are given as a file which consist of the following + parts described below: + 1) File format number (it is 1 at this moment) + 2) Delimiters used to enclose a) simple strings, b) char- + acter lists, c) regular expressions + 3) Starting sequence for output + 4) Ending sequence for output + 5) Number of input "character sets" + 6) SHIFT-OUT/SHIFT-IN sequences for each input character + set + 7) Number of output "character sets" + 8) SHIFT-OUT/SHIFT-IN sequences for each output character + set + 9) Transliteration table + + GENERAL COMMENTS + The transliteration rules file consists of comments and + data. The comments may be included in the file as: + a) line comments --- lines starting with ! or # character + (# or ! must be in the first column of a line) are + treated as comments and are not read in by the program. + b) comments following all required entries on the line. + They must be separated by at least one space from the + last data entry on the line and need not start with any + particular character. These comments cannot be used + + + +JKL Last change: 22-Jan-1997 7 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + within multiline sequences. + + The data entries consist of integer numbers and strings. + The strings may represent: + a) plain strings + b) character lists + c) regular expressions + + All strings which appear in the file, are processed through + the "string processor", which allows entering unprintable + characters as codes. The character code is specified as a + backslash "\" followed by at least 2 digit(s) (i.e., \01 + produces code=1, but \1 is passed unchanged). The following + formats are supported: + \0123 character of octal code 123 (when leading zero + present) + \123 character of decimal code 123 (when leading digit + is not zero) + \0o123 or \0O123 character of octal code 123 + \0d123 or \0D123 character of decimal code 123 + \0xA3 or \0XA3 or \0xa3 character of hexadecimal code + A3 + + The allowed digits are 0-7 for octal codes, 0-9 for decimal + codes and 0-F (and/or 0-f) for hexadecimal codes. In a + situation when code has to be followed by a digit character, + you need to enter the digit as a code. E.g., if you want + character \0xA3 followed by a letter C, you need to specify + letter C as a code (\0x43 or \103 or \0o103 or \0d67) and + type the sequence as, e.g., \0xA3\103. Character resulting + in a code 0 (zero) (e.g., \00) is special. It tells: "skip + everything what follows me in this string". It does not + make sense to use it, since you can always terminate the + sequence with a delimiter. When you use an empty string as + a matching sequence, remember that it does not match any- + thing. + + If the line with entries is too long, you can break it + between the fields. If the string is too long to fit a + line, you can break it before any nonblank character by the + \ (backslash) followed by white space (i.e., new lines, + spaces, tabs, etc.). The \ and the following white space + will be removed from the string by the string preprocessor. + However, you are not allowed to break the individual charac- + ter codes (and you probably would not do it ever for + aestetic purposes). For example: + "experi\ + mental design" + is equivalent to: + "experimental design" + while: + "experimental\ + + + +JKL Last change: 22-Jan-1997 8 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + design" + is equivalent to: + "experimentaldesign" + If you need to have \ followed by a space in your string, + you need to enter either a backslash or a space following it + as an explicit character code, for example: + "\\0o40" + will produce a \ followed by the space, while the string: + "\ " + will be empty. + + The preprocessor knows only about comments, plain charac- + ters, character codes, and continuation lines. However, some + characters and their combinations may have a special meaning + in lists and regular expressions. + + + DETAILS OF FILE STRUCTURE + + + Ad.1) File format number. This is simply a digit 1 on a line + by itself at the moment. This entry is included to allow + future extensions of the transliteration description file + without the need to modify older transliteration descrip- + tions (program will read data according to the current + file format number given in the file). + + Ad.2) String delimiters. The subsequent 3 lines specify + pairs of single character delimiters for 3 types of text + data. The line format is: + opening_character closing_character. + These are needed to mark the beginning/end and the type + of the text data. Each string (text datum) is saved + starting from the first character after opening delim- + iter, and ends at the last character before the closing + delimiter. If you need to use the closing delimiter + within a string, you need to specify it as its code + (e.g., if you are using () pair as delimiters, specify + ")" as \0x29). The opening delimiter may be the same or + different from the closing delimiter. + + a) The first line contains characters used to enclose + (bracket) a plain string. Plain strings are directly + matched to input data or directly sent to output. I + suggest to stick to " " pair for plain strings. The + ASCII code for " is \0d34 = \0x22 = \0o42 if you need + it inside the string itself. + + b) The second line contains characters to mark the begin- + ning and the end of the list. Lists are used to + translate single character codes. I suggest [ and ] + delimiters for the list (ASCII code of "]" is: \0d93 = + + + +JKL Last change: 22-Jan-1997 9 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + \0x5D = \0o135). The lists may include ranges, for + example: [a-zA-Z0-9] will include all Latin letters + (small and capital) and digits. Note that order is + important: [a-d] is equivalent to [abcd], while [d-a] + will result in an error. If you want to include "-" + (minus) in the list, you need to place it as the first + or the last character. There are only two special char- + acters on the list, the "-" described above, and the + "]" character. You need to enter the "]" as its code. + E.g., for ASCII character table [*--] is equivalent to + [*+,-], is equivalent to [\42\43\44\45]. The order of + characters in the list does not matter unless the input + list corresponds to the output list (this will be + explained later). Empty lists do not make sense. + + c) The third line of delimiter specification contains + delimiters for regular expressions and substitution + expressions. These strings are used for "flexible" + matches to the text in the input file. They are very + similar to the ones used in UN*X for searching text in + utilities like: grep, sed, vi, awk, etc., though only + a subset of full UN*X regular expression syntax is used + here. I suggest enclosing them within braces { and } + (ASCII code for } is \0d125 = \0x7D = \0o175). Actu- + ally, regular expressions can only be used for input + sequences, and for output sequences the {} are used to + enclose substitution sequences. This will be explained + below. The description of the syntax for + regular/substitution expressions is adapted from the + documentation for the regexp package of Henry Spencer, + University of Toronto --- this regular expression pack- + age was incorporated, after minute modifications, into + the program. + + + REGULAR EXPRESSION SYNTAX + A regular expression is zero or more branches, + separated by `|'. It matches anything that matches + one of the branches. The `|' simply means "or". + A branch is zero or more pieces, concatenated. It + matches a match for the first, followed by a match + for the second, etc. + A piece is an atom possibly followed by `*', `+', + or `?'. An atom followed by `*' matches a + sequence of 0 or more matches of the atom. An atom + followed by `+' matches a sequence of 1 or more + matches of the atom. An atom followed by `?' matches + zero or one occurrences of atom. + An atom is a regular expression in parentheses + (matching a match for the regular expression), a + range (see below), `.' (matching any single charac- + ter), a `\' followed by a single character (matching + + + +JKL Last change: 22-Jan-1997 10 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + that character), or a single character with no other + significance (matching that character). + A range is a sequence of characters enclosed in + `[]'. It normally matches any single character from + the sequence. If the sequence begins with `^', it + matches any single character not from the rest of the + sequence. If two characters in the sequence are + separated by `-', this is shorthand for the full list + of ASCII characters between them (e.g. `[0-9]' + matches any decimal digit). To include a literal `]' + in the sequence, make it the first character (follow- + ing a possible `^'). To include a literal `-', make it + the first or last character. The regular expression + can contains subexpressions which are enclosed in a () + pair. These subexpressions are numbered 1 to 9 and can + be nested. The numbering of subexpressions is given in + the order of their opening parentheses "(". For exam- + ple: + (111)...(22(333)222(444)222)...(555) + Note that expression 2 contains within itself expres- + sions 3 and 4. + These subexpressions can be referenced in the substitu- + tion string which is described below in the paragraph + below, or can be used to delimit atoms. + Examples: + {[\0d32\0d09]\0d10} --- will match space or tab fol- + lowed by new line + {[Tt][Ss]} --- will match TS, Ts, tS and ts + {TS|Ts|tS|ts} --- same as above + {[\0d09-\0d15 ][^hH][^uU][a-zA-Z]*[\0d09-\0d15 ]} --- + all words which do not start with hu, Hu, hU, HU. + There is a space between \0d15 and ]. + Note that specifying expressions like {.*} (i.e., + match all characters) does not make much sense, + since it would mean here: match the whole input + file. However, expressions like {A.*B} should be + acceptable, since they match a pair of A and B, and + everything in between them, e.g. for a string like: + "This is Mr. Allen and this is Mr. Brown." this + expression should match the string: "Allen and this + is Mr. B". + Remember to put a backslash "\" in front of the follow- + ing characters: .[()|?+*\ if you want their literal + meaning outside the range enclosed in []. Inside the + range they have their literal meaning. If you know the + syntax of UN*X regular expressions, please note that ^ + and $ anchors are not supported and are treated as nor- + mal characters (with the exception of ^ negation within + []). + + SUBSTITUTION EXPRESSIONS + After finding a match for a regular expression in the + + + +JKL Last change: 22-Jan-1997 11 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + input text, a substitution is made. It can be a simple + substitution where the whole matching string is + replaced by another string, or it may reuse a portion + or the whole matching string. The subexpressions (the + ones enclosed in parentheses) within the regular + expression which matched the input text can be refer- + enced in the substitution expression. Only the follow- + ing characters have special meaning within substitution + expression: + & --- will put the whole matching string. + \1 --- will put the match for the 1st subexpression + in (). + \2 --- will put the string which matched 2nd subex- + pression, etc. + \9 --- will place in a replacement string the 9th + subexpression (provided that there was 9 () pairs + in the regular expression) + + Only 9 subexpressions are allowed. All other charac- + ters and sequences within the substitution expression + will be placed in a substitution string as written. To + be able to put a single backslash there, you need to + put two of them. To be able to place the unchanged + codes of the above characters (i.e., to make them + literals), you need to precede them with a backslash + "\", i.e., to get & in the output string you need to + write it as \&. Similarly, to place literal \1, \2, + etc., you need to enter it as \\1, \\2, etc. Note that + characters .+[]()^, etc. which had a special meaning in + the regular expressions, do not have any special mean- + ing in the substitution expression and will be output + as written. + Example: + The regular expression: + {([Tt])([Ss])} and the corresponding substitution + expression {\1.\2} puts a period between adjoining + letters t and s preserving their letter case. + The expression: + {([A-Za-z]+)-[ \0x09]*([\0x0A-\0x0D]+)[ \0x09]*([A- + Za-z,.?;:"\)'`!]+)[ \0x09]} + and the substitution expression {\1\3\2} dehyphen- + ate words (when you understand this one, you are a + guru...). For example: con- (NL)cert is changed + to concert(NL), where NL stands for New Line. It + looks for one or more letters (saves them as sub- + string 1) followed by a hyphen (which may be fol- + lowed by zero or more spaces or tabs). The hyphen + must be followed by a NewLine (ASCII characters + 0A-0D hex form various new line sequences) and + saves NewLine sequence as a subexpression 2. Then + it looks for zero or more tabs and spaces (at the + beginning of the line). Then it looks for the rest + + + +JKL Last change: 22-Jan-1997 12 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + of the hyphenated word and saves it as substring 3. + The word may have punctuation attached. Then it + looks again for some spaces or tabs. The substitu- + tion expression junks all sequences which were not + within (), i.e., hyphen and spaces/tabs and inserts + only substrings but in a different order. The \1 + (word beginning) is followed by \3 (word end) and + followed by the NewLine --- \2. The {\2\1\3} would + be probably equally good, though you would need to + move the punctuation matching to the beginning of + the regular expression. + Ad.3) Starting sequence. This sequence will be sent to the + output before any text. It is enclosed in the pair of + string delimiters. I use it to output LaTeX preamble. + However, it can be empty, if not used. The (sequence) + may contain any characters, including new lines, etc. + Example: + "" # empty sequence + + Example: + "\documentstyle{article} + \input cyracc + \begin{document} + " + is right (note a new line at the end), but + "\documentstyle{article} + \input cyracc # this comment will be included! + \begin{document}" # while this will not + is wrong. + + Ad.4) Ending sequence. Similar to 1), but will be appended + at the end of the output file. + For example: + "\end{document} + " + + Ad.5) Number of input character sets. For example, in some + incarnation of KOI7, there are two character sets: Latin + and Cyrillic. Cyrillic character sequence follows SHIFT- + OUT character (CTRL-N), \0x0e, and is terminated by + SHIFT-IN character (CTRL-O), \0x0f. Another way of look- + ing at it is that Latin characters follow CTRL-O and + cyrillic ones follow CTRL-N. + + If there is only one character set on input you should + specify 0 as a number of input char sets, since the input + file obviously does not contain any SHIFT-OUT/IN + sequences. + + Ad.6) SHIFT-OUT/SHIFT-IN sequences for each input character + set. These lines appear only if you specified nonzero + number of character sets. These lines contain also + + + +JKL Last change: 22-Jan-1997 13 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + "nesting sequences", which will be explained later in + this section. You do not use "nesting sequences" fre- + quently, and let us assume for a moment that nesting data + are empty strings. The strings or regular expressions + specified here are matched with the contents of input + text. If match was found, the matching sequence is usu- + ally deleted from the input text and: + a) for SHIFT-OUT sequence: the current input character + set number is changed to the new one corresponding to + the SHIFT-OUT sequence, or + b) for SHIFT-IN sequence: the previous input character + set number is restored, (i.e., the one which preceded + the SHIFT-OUT sequence for the current set). Note + that only the SHIFT-IN sequence for the current set + is matched. The SHIFT-IN sequences for other charac- + ter sets than the current set are not matched. The + bracketing of sets is assumed perfect. If the SHIFT- + IN sequence for the current set is an empty string, + the input set number is changed when SHIFT-OUT + sequence of the new set is detected. + For each input character set, you have to specify a line + consisting of 6 strings/expressions separated by spaces: + SO-match SO-subs NEST-up NEST-down SI-match SI-subs + where: + SO-match --- the string or regular expression for the + SHIFT-OUT sequence for the current character set. If + detected, the input character set is changed to this + set. + SO-subs --- this is usually an empty string (i.e., the + input sequence matching SO-match is removed). But it + can be a replacement string or a substitution expres- + sion, which will substitute the original matching + SHIFT-OUT sequence. + NEST-up --- this string (or a regular expression) is usu- + ally an empty string). However, it can be used to count + brackets for detection of SHIFT-IN bracket, if SHIFT-IN + sequence is not unique. Its use is explained below. + NEST-down --- a counterpart of NEST-up. It is explained + later. + SI-match --- when a sequence in an input file matches the + string or regular expression given as SI-match for a + current input character set, the input character set + number is restored to the previous set. Note, that only + SI-match for a current set is matched with input char- + acters. + SI-subs --- this is usually an empty string (i.e., input + sequence which matched SI-match is removed), but if it + is not, the input characters which matched the SI-match + are replaced with the SI-subs. + + The KOI7 case described above may be specified as: + 2 # 2 input sets + + + +JKL Last change: 22-Jan-1997 14 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + "" "" "" "" "" "" # Latin(set 1) + "\016" "" "" "" "\017" "" # Cyrillic(set 2) + or + 2 # 2 sets + "\017" "" "" "" "" "" # Latin(set 1) + "\016" "" "" "" "" "" # Cyrillic(set 2) + Before the input is processed, the program is initialized + to the character set of the first set. In the above case, + it is important, since declaration: + 2 # 2 sets + "\016" "" "" "" "" "" # Cyrillic(set 1) + "\017" "" "" "" "" "" # Latin(set 2) + would be wrong and would mess up the Latin characters + preceding first Cyrillic sequence. + + The nesting sequences are used only for specific situa- + tions. I needed them to write a transliteration table + from LaTeX to KOI8. In LaTeX the { } pair is used for + grouping and appears frequently in the text. The sequence + of cyrillic characters is also a group in LaTeX. The + SHIFT-OUT sequence for Russian letters in LaTeX is (at + least in my case): "{\cyr ", and the end of the Russian + letters is marked by "}", but the "}" has to be the + bracket matching the opening "{" in "{\cyr ", not just + any bracket. For this reason, my SHIFT-OUT/IN entry was + in this case: + "{\cyr " "" "{" "}" "}" "" # Cyrillic codes + Whenever the "{\cyr " was found, the program zeroes the + counter. It adds +1 to it, when NEST-up sequence (i.e., + the "{" here) is found, and subtracts 1 from it, when the + NEST-down sequence is found (i.e., the "}"). The check- + ing for a SHIFT-IN sequence (i.e., the "}") for cyrillic + set is done only when the counter value is zero (i.e., + all pairs inside the cyrillic text are matched. In fact, + the process is more complicated than that (the counter + for an opened character set is placed on the stack), but + these are details you can find in the code itself. + What if the SHIFT-IN and SHIFT-OUT sequence is the same + character? Starting from version 1.01 the TRANSLIT will + also work in such cases. Let us assume that the SHIFT-IN + and SHIFT-OUT sequence is a single character "%" which + switches between two character sets. Also, if we want to + use it in the text, we have to double it, i.e., "%%" will + not be a SHIFT-IN/OUT sequence but will denote a literal + percent sign. We can do it in the following way: + "" "" "" "" "" "" # Latin + letters + {%([^%])} {\1} "" "" {%([^%])} {\1} # Cyrillic + codes + and later in the transliteration table (see below) we + should put a line: + 0 "%%" 0 "%" # change doubled % to + + + +JKL Last change: 22-Jan-1997 15 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + a single one + The same effect, for identical SHIFT-IN/OUT sequences, + can be accomplished with a -3 character set code and will + be described below. + + Ad.7) Number of output "character sets". This is analogous + to the input case. The characters sent to output may + belong to different sets. For example, when the character + (or the sequence) from set 2 is followed by the character + (or the sequence) from set 1, the program first sends the + SHIFT-IN sequence for set 2 (if it is not empty) and then + the SHIFT-OUT sequence for set 1 (if it is not empty). If + the output character (or sequence) is assigned to set 0, + then no SHIFT-IN/SHIFT-OUT sequences are sent to output. + If there is only one set of output characters, you should + specify 0. Note that you may have several input sets and + several output sets, though this is rare. Usually, you + have one input set and many output character sets, or + vice versa. Again, if you have only one output set, you + do not have any SHIFT-IN/SHIFT-OUT sequences, since those + are send to output only when a set number is changed. + But you are free to experiment. + + Ad.8) SHIFT-OUT/SHIFT-IN sequences for each output character + set. It is similar to the input case, however, the NEST- + in and NEST-up sequences are not used here. Again, before + any text is sent to output, the character set specified + as the first one is assumed. If SHIFT-OUT/IN sequences + are not used (i.e., you have only one output character + set), you will not have any SHIFT-OUT/SHIFT-IN data + lines. The KOI8 (single character set containing all + Latin and Russian letters) to KOI7 (the set using over- + lapping codes switched by SHIFT-OUT/IN sequences) conver- + sion could be therefore accomplished by the following + table: + 2 # 2 output sets + "" "" # Latin Letters + "\016" "\017" # Russian Letters case + + Ad.9) Transliteration table for individual character or + their sequences. It is a core of your transliteration + data. There are 4 columns in the transliteration table: + (inp_set_no) (inp_seq) (out_set_no) (out_seq) + These 4 columns are separated by spaces. The + (input_set_number) corresponds to the input character set + number as specified above for input SHIFT-OUT/SHIFT-IN + data, or zero. If zero is used (even if number of input + sets is not zero), the (input_sequence) will be always + matched, irrespectively of the current input character + set imposed by the SHIFT-OUT sequence. This is useful, + since some characters are universal (e.g., new lines, + spaces, pluses, minuses, etc.) irrespectively of the + + + +JKL Last change: 22-Jan-1997 16 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + current character set. The (input_sequence) is the + sequence of characters to be matched with characters in + the input file, and if found (within the character set + specified) it is replaced by the (output_sequence) and + sent to output (i.e., the matching is interrupted, the + (output_sequence) sent to ouput, the input file pointer + is moved to the first character after the matched + sequence and matching resumes). The (output_set_number) + specifies the output character set. When the output char- + acter set changes during transliteration, the appropriate + SHIFT-IN sequence of the previous set and the current + set's SHIFT-OUT sequence is sent to output. The + (output_set_number) may also be zero (even if number of + output sets is not zero). In this case, the current out- + put set status is not changed, and no SHIFT-IN/OUT + sequences is sent to output. Lastly, the output set code + may be -1, -2 or -3. In this case, the substitution is + performed within input string that matched but the output + sequence is not sent to the output yet. Depending on the + code, the following action is performed: + -1 --- program makes the substitution in the input + string (i.e., substitutes the matching string with + the input string in the input buffer). It does not + send the output sequence to the output, but continues + matching input sequences following the currently + matched one. + -2 --- like code -1, but matching is resumed from the + first sequence on the list. + -3 --- like code -1, but matching is resumed from the + input SHIFT-OUT/IN sequences. + E.g., if the unprocessed text in the input file is: + mental procedure was not successful since.......... + and there was a line in transliteration table: + 0 "me" -1 "you" + the input text would be changed to: + yountal procedure was not successful since.......... + and all remaining matching data would be applied to this + text, rather than original text. The -2 code backsteps + to the point where the matching of transliteration + starts. The -3 code backsteps even further, to the point + where the input SHIFT-OUT and SHIFT-IN sequences are + matched. Since the order of sequences to match is cru- + cial here, for the case of output set code -1/-2/-3 even + one-character input sequences are matched in the order + specified. BE CAREFUL HERE. You may create infinite + loops. If you use code -2/-3, be sure that the resulting + sequence after substitution with the code -2/-3, will not + match previous sequences with codes -2/-3. + The (output_sequence) is a sequence which substitutes the + corresponding (input_sequence). If (output_sequence) is + "" (i.e., empty string) then (input_sequence) is effec- + tively deleted. The (input_sequence)s are compared with + + + +JKL Last change: 22-Jan-1997 17 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + input in the order specified unless backstepping -2/-3 + code is used (the matching is done from the first + sequence again). I use the code -1 e.g., to dehyphenate + words when changing to LaTeX. Code -2 is useful if you + want to skip next comparisons, and the resulting substi- + tution string will match earlier matching expressions. I + do not see many uses for the code -3, but it can be used + to resolve "toggle" SHIFT-IN/OUT sequence, as described + in an example further below. The order for multicharac- + ter sequences is therefore important (the single charac- + ter sequences are always compared after all multicharac- + ter sequences, and can be therefore put anywhere). The + longer multicharacter sequences should be specified + before shorter ones, unless they are some "preprocessing" + steps with codes -1/-2/-3. The order may sometimes be + crucial. If you need single character sequences matched + in a specific order, enter them as regular expressions, + i.e., as {c} instead of "c". In short, the multicharac- + ter input sequences and regular expressions are matched + to input text in the order specified. For the sake of + efficiency, the single character input sequences (with + exception of output set code -1/-2/-3) and input lists + are handled as a case of remapping and are matched in the + order of character codes associated with them. If you + specify the same single input character twice for a given + input set, the program will complain. The following com- + binations of input and output sequences are allowed: + Input Sequence Output Sequence + "plain string" only "plain string" + [list] [list] or "plain string" + {regular expression} {substitution expression} or + "plain string" + When match is found, the matching sequence is removed and + substituted with an output sequence. If this results is + changing the current output character set, the appropri- + ate SHIFT-IN/SHIFT-OUT pair is sent to the output before + the transliterated output sequence. If list is used as + the input sequence, you may either use: + a) plain string as output sequence. In this case, if + current input character belongs to the input list, it + is replaced by the output string. I use it to delete + ranges of characters which do not have any correspond- + ing characters in the output set (e.g., some graphics + characters). In this case, the order of characters on + the input list is not important. + b) if the output string is also a list then it has to + contain exactly the same number of characters as the + input list. In this case, the 1st character from the + input list is replaced by the 1st character from the + output list, the 2nd one by the 2nd one, etc. There- + fore, the order of characters is important. + Theoretically, if there is one-to-one correspondence + + + +JKL Last change: 22-Jan-1997 18 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + between characters in the input set and characters in the + output set, you can make the conversion by using a single + line consisting of two lists. But it looks ugly... And is + difficult to read. And for the program, the substitution + takes the same time, if the characters are specified + separately, or when they are specified as matching lists. + If regular expression is used to match the input charac- + ters, the matching sequence may be replaced by a plain + string or a substitution string, which was described + above. + Examples: + 2 "CCCP" 0 "" + will delete all occurrences of CCCP from the input + file (but not Cccp or CCCp) for input set 2. + + 0 "\0xD1" 0 "ya" + will replace all occurrences of character of the code + \0xD1 with a two letter sequence "ya". + + 0 \0xD1 2 q + will replace all characters \0xD1 with a character "q" + and output SHIFT-IN/OUT sequence if necessary. + + 2 "q" 0 "\0xD1" + will replace letter q (if the current input set is 2) + with a code \0xD1. + + 0 "\0xD1" 2 "ya" + will replace code \0xD1 with a sequence ya (assuming + that SHIFT-OUT and SHIFT-IN sequences for output set 2 + are: {\cyr and }, respectively, you will get {\cyr + ya}). + + If a character is not specified in the transliteration + table, it will be output as is, i.e., it corresponds + to a line: + 0 "c" 0 "c" + where c is the character. If you want to delete cer- + tain characters, you need to explicitly specify this, + e.g.: + 0 [a-z] 0 "" + will delete all lower case Latin letters from the + text. + Below is an example of solving the identical SHIFT- + IN/OUT sequences problem using character set code -3 + which I promissed above. Assume, that you have 2 char- + acter sets in the input file, but switching between + them is accomplished by a "toggle" character. That is, + if the toggle character is found, you should switch to + the other set. Also, if you want to use the toggle + character in the set, you need to double it. Let also + assume that we have 2 character codes which will + + + +JKL Last change: 22-Jan-1997 19 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + never, ever appear. We can fool the translit by chang- + ing toggle character to a unique character and back- + stepping with character code -3 to check for SHIFT- + IN/OUT sequences again. Let the % sign be a toggle + character, and that we have two codes (for example + codes \254 and \255) which will never appear in our + text. The appropriate entries in the transliteration + table may look like: + 1 {%([^%])} -3 {\254\1} + 2 {%([^%])} -3 {\255\1} + 0 "%%" 0 "%" + i.e., when the single % is seen in set 1, produce + SHIFT-OUT sequence for set 2; and when a single % is + seen in set 2, produce SHIFT-IN sequence for set 1. + The appropriate input character set definitions will + be: + 2 # number of input character sets + "\255" "" "" "" "" "" + "\254" "" "" "" "" "" + However, be warned. I never tried this. If this trick + does not work, please let me know. + + Before you decide to create your own transliteration + file, please examine existing transliteration files. Do + yourself (and others) a favor --- put as many comments as + possible there. If you allow others to use your transli- + teration files, please include your name and e-mail + address and file creation date. + + + Program matches the sequences in a specific order: + 1) if NEST counter is zero, Match/substitute current set + SHIFT-IN sequence + 2) If matched, restore previous set number + 3) If matched, restore previous set nest counter + 4) Match/substitute input SHIFT-OUT sequences + 5) If matched, save current set and start new one + 6) If matched, zero nest counter for NEST sequences + 7) Match/substitute transliteration sequences + 8) If matched and code = -1 make substitution in input + buffer and continue matching the next sequence. + 9) If matched and code = -2 make substitution and goto 7) + 10) If matched and code = -3 make substitution and goto 1) + 11) Match (no substitution) NEST-up and NEST-down to input + buffer + 12) If NEST-up matched, increment counter for current set + 13) If NEST-down matched, decrement counter for current set + 14) If match in 7) send substitute sequence to output + 15) If no match in 7) (or code -1) output current input + character + 16) Advance input pointer to point at new characters + 17) If End of File, break + + + +JKL Last change: 22-Jan-1997 20 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + 18) Goto 1) + + +ASCII CHARACTER CODES + dec hx oct ch dec hx oct ch + + 0 00 000 ^@ NUL 64 40 100 @ + 1 01 001 ^A SOH 65 41 101 A + 2 02 002 ^B STX 66 42 102 B + 3 03 003 ^C ETX 67 43 103 C + 4 04 004 ^D EOT 68 44 104 D + 5 05 005 ^E ENQ 69 45 105 E + 6 06 006 ^F ACK 70 46 106 F + 7 07 007 ^G BEL 71 47 107 G + 8 08 010 ^H BS 72 48 110 H + 9 09 011 ^I HT 73 49 111 I + 10 0a 012 ^J LF 74 4a 112 J + 11 0b 013 ^K VT 75 4b 113 K + 12 0c 014 ^L FF 76 4c 114 L + 13 0d 015 ^M CR 77 4d 115 M + 14 0e 016 ^N SO 78 4e 116 N + 15 0f 017 ^O SI 79 4f 117 O + 16 10 020 ^P DLE 80 50 120 P + 17 11 021 ^Q DC1 81 51 121 Q + 18 12 022 ^R DC2 82 52 122 R + 19 13 023 ^S DC3 83 53 123 S + 20 14 024 ^T DC4 84 54 124 T + 21 15 025 ^U NAK 85 55 125 U + 22 16 026 ^V SYN 86 56 126 V + 23 17 027 ^W ETB 87 57 127 W + 24 18 030 ^X CAN 88 58 130 X + 25 19 031 ^Y EM 89 59 131 Y + 26 1a 032 ^Z SUB 90 5a 132 Z + 27 1b 033 ^[ ESC 91 5b 133 [ + 28 1c 034 ^\ FS 92 5c 134 \ + 29 1d 035 ^] GS 93 5d 135 ] + 30 1e 036 ^^ RS 94 5e 136 ^ + 31 1f 037 ^_ US 95 5f 137 _ + 32 20 040 SP 96 60 140 ` + 33 21 041 ! 97 61 141 a + 34 22 042 " 98 62 142 b + 35 23 043 # 99 63 143 c + 36 24 044 $ 100 64 144 d + 37 25 045 % 101 65 145 e + 38 26 046 & 102 66 146 f + 39 27 047 ' 103 67 147 g + 40 28 050 ( 104 68 150 h + 41 29 051 ) 105 69 151 i + 42 2a 052 * 106 6a 152 j + 43 2b 053 + 107 6b 153 k + 44 2c 054 , 108 6c 154 l + 45 2d 055 - 109 6d 155 m + + + +JKL Last change: 22-Jan-1997 21 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + 46 2e 056 . 110 6e 156 n + 47 2f 057 / 111 6f 157 o + 48 30 060 0 112 70 160 p + 49 31 061 1 113 71 161 q + 50 32 062 2 114 72 162 r + 51 33 063 3 115 73 163 s + 52 34 064 4 116 74 164 t + 53 35 065 5 117 75 165 u + 54 36 066 6 118 76 166 v + 55 37 067 7 119 77 167 w + 56 38 070 8 120 78 170 x + 57 39 071 9 121 79 171 y + 58 3a 072 : 122 7a 172 z + 59 3b 073 ; 123 7b 173 { + 60 3c 074 < 124 7c 174 | + 61 3d 075 = 125 7d 175 } + 62 3e 076 > 126 7e 176 ~ + 63 3f 077 ? 127 7f 177 DEL + + + +CONVERSION: DECIMAL<-->OCTAL<-->HEX. + 000 000 00 064 100 40 128 200 80 192 300 C0 + 001 001 01 065 101 41 129 201 81 193 301 C1 + 002 002 02 066 102 42 130 202 82 194 302 C2 + 003 003 03 067 103 43 131 203 83 195 303 C3 + 004 004 04 068 104 44 132 204 84 196 304 C4 + 005 005 05 069 105 45 133 205 85 197 305 C5 + 006 006 06 070 106 46 134 206 86 198 306 C6 + 007 007 07 071 107 47 135 207 87 199 307 C7 + 008 010 08 072 110 48 136 210 88 200 310 C8 + 009 011 09 073 111 49 137 211 89 201 311 C9 + 010 012 0A 074 112 4A 138 212 8A 202 312 CA + 011 013 0B 075 113 4B 139 213 8B 203 313 CB + 012 014 0C 076 114 4C 140 214 8C 204 314 CC + 013 015 0D 077 115 4D 141 215 8D 205 315 CD + 014 016 0E 078 116 4E 142 216 8E 206 316 CE + 015 017 0F 079 117 4F 143 217 8F 207 317 CF + 016 020 10 080 120 50 144 220 90 208 320 D0 + 017 021 11 081 121 51 145 221 91 209 321 D1 + 018 022 12 082 122 52 146 222 92 210 322 D2 + 019 023 13 083 123 53 147 223 93 211 323 D3 + 020 024 14 084 124 54 148 224 94 212 324 D4 + 021 025 15 085 125 55 149 225 95 213 325 D5 + 022 026 16 086 126 56 150 226 96 214 326 D6 + 023 027 17 087 127 57 151 227 97 215 327 D7 + 024 030 18 088 130 58 152 230 98 216 330 D8 + 025 031 19 089 131 59 153 231 99 217 331 D9 + 026 032 1A 090 132 5A 154 232 9A 218 332 DA + 027 033 1B 091 133 5B 155 233 9B 219 333 DB + 028 034 1C 092 134 5C 156 234 9C 220 334 DC + 029 035 1D 093 135 5D 157 235 9D 221 335 DD + + + +JKL Last change: 22-Jan-1997 22 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + 030 036 1E 094 136 5E 158 236 9E 222 336 DE + 031 037 1F 095 137 5F 159 237 9F 223 337 DF + 032 040 20 096 140 60 160 240 A0 224 340 E0 + 033 041 21 097 141 61 161 241 A1 225 341 E1 + 034 042 22 098 142 62 162 242 A2 226 342 E2 + 035 043 23 099 143 63 163 243 A3 227 343 E3 + 036 044 24 100 144 64 164 244 A4 228 344 E4 + 037 045 25 101 145 65 165 245 A5 229 345 E5 + 038 046 26 102 146 66 166 246 A6 230 346 E6 + 039 047 27 103 147 67 167 247 A7 231 347 E7 + 040 050 28 104 150 68 168 250 A8 232 350 E8 + 041 051 29 105 151 69 169 251 A9 233 351 E9 + 042 052 2A 106 152 6A 170 252 AA 234 352 EA + 043 053 2B 107 153 6B 171 253 AB 235 353 EB + 044 054 2C 108 154 6C 172 254 AC 236 354 EC + 045 055 2D 109 155 6D 173 255 AD 237 355 ED + 046 056 2E 110 156 6E 174 256 AE 238 356 EE + 047 057 2F 111 157 6F 175 257 AF 239 357 EF + 048 060 30 112 160 70 176 260 B0 240 360 F0 + 049 061 31 113 161 71 177 261 B1 241 361 F1 + 050 062 32 114 162 72 178 262 B2 242 362 F2 + 051 063 33 115 163 73 179 263 B3 243 363 F3 + 052 064 34 116 164 74 180 264 B4 244 364 F4 + 053 065 35 117 165 75 181 265 B5 245 365 F5 + 054 066 36 118 166 76 182 266 B6 246 366 F6 + 055 067 37 119 167 77 183 267 B7 247 367 F7 + 056 070 38 120 170 78 184 270 B8 248 370 F8 + 057 071 39 121 171 79 185 271 B9 249 371 F9 + 058 072 3A 122 172 7A 186 272 BA 250 372 FA + 059 073 3B 123 173 7B 187 273 BB 251 373 FB + 060 074 3C 124 174 7C 188 274 BC 252 374 FC + 061 075 3D 125 175 7D 189 275 BD 253 375 FD + 062 076 3E 126 176 7E 190 276 BE 254 376 FE + 063 077 3F 127 177 7F 191 277 BF 255 377 FF + + + +INSTALLATION + Program is given in a source form. It was tried under UN*X, + VMS and MS-DOS systems and ran. The file readme.doc contains + the details on how to obtain the whole package. You can + retrieve this file from anonymous ftp on kekule.osc.edu in + the directory /pub/russian/translit. You can also obtain it + via e-mail by sending a message: + get translit/readme.doc from russian + to OSCPOST@osc.edu or OSCPOST@OHSTPY.BITNET. + + The source of the program consists of several files: + + paths.h + must be edited before compilation. It contains its own + comments what to do. The defines in this file relate to + + + +JKL Last change: 22-Jan-1997 23 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + the operating system you are using and the default path + for searching transliteration table. + + translit.c + It contains the main program. This was intended to be + a portable code. + + reg_exp.h + the include file for regular expression matching + library of Henry Spencer from the University of + Toronto. This regular expression package was posted to + comp.sources.misc (volume 3). Also 4 patches were + posted (in volumes: 3, 4, 4, 10). I applied the patches + to the original code and made small modifications to + the code, which are marked in the source code. + + reg_exp.c + the regular expression library for compilation and + matching of regular expressions. + + reg_sub.c + the regular expression substitution routine. + + + Before you compile this program you have to edit paths.h. + Read comments in the file. During compilation, all source + code should reside in the current directory. + Then you may compile the program under UN*X as (for exam- + ple): + cc -o translit translit.c reg_exp.c reg_sub.c + and copy the program translit to some standard directory + which is in users' path (for example: /usr/local/bin). Then + you need to copy transliteration tables to the directory + which you have chosen in paths.h. If you get errors, then + it is not OK. Please, report them to the author (with all + the gory details: error message, line number, machine, + operating system, etc.). + + Under VMS (VAXes) you need to compile it as: + cc translit + cc reg_exp + cc reg_sub + link translit+reg_exp+reg_sub,sys$library:vaxcrtl/lib + and before you can use the program, you need to type (or + better put into your LOGIN.COM file) a line: + translit == "$SYS$USER:[ME.TRA]TRANSLIT.EXE" + or whatever is the full path to the translit executable + image which you created with LINK. Note the quotes and the $ + sign in front of program path. + + On an IBM-PC I used MicroSoft C 5.1 as: + cl /FeTRANSLIT /AL /FPc /W1 /F 5000 /Ox /Gs translit.c + + + +JKL Last change: 22-Jan-1997 24 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + reg_exp.c reg_sub.c + + + +RULES, CONDITIONS AND AUTHOR'S WHISHES + You can distribute this code and associated files under + these conditions: + 1) You will distribute all files (even if you think that + they are garbage). You may get the complete set from + anonymous ftp at kekule.osc.edu in + /pub/russian/translit. You can also get the program and + associated files via e-mail. To get the instructions for + e-mail distribution send a line: + send translit/readme.doc from russian + to OSCPOST@osc.edu or OSCPOST@OHSTPY.BITNET. You are + not allowed to distribute the incomplete distribution. + The following files should be present in the distribu- + tion: + alt-gos.rus - ALT to GOSTCII table + alt-koi8.rus - ALT to KOI8 table + example.alt.uu - uuencoded example in ALT + example.ko8.uu - uuencoded example in KOI8 + example.pho - phonetic transliteration example + example.tex - LaTeX example + gos-alt.rus - GOSTCII to ALT table + gos-koi8.rus - GOSTCII to KOI8 table + koi7-8.rus - KOI7 to KOI8 table + koi7nl-8.rus - KOI7 (no Latin) to KOI8 table + koi8-7.rus - KOI8 to KOI7 table + koi8-alt.rus - KOI8 to ALT table + koi8-gos.rus - KOI8 to GOSTCII table + koi8-lc.rus - KOI8 to Library of Congress table + koi8-phg.rus - KOI8 to GOST transliteration + koi8-php.rus - KOI8 to Pokrovsky transliteration + koi8-ltx.rus - KOI8 to LaTeX conversion + koi8-tex.rus - KOI8 to Plain TeX conversion + order.txt - Order form for ordering the program + paths.h - Include file for translit.c + phg-koi8.rus - GOST transliteration to KOI8 + pho-8sim.rus - Simple phonetic to KOI8 + pho-koi8.rus - Various phonetic to KOI8 + php-koi8.rus - Pokrovsky to KOI8 + readme.doc - short description of the files + reg_exp.c - regular expression code by Henry Spencer + reg_exp.h - include for reg_exp.c and reg_sub.c + reg_sub.c - regular expression code by H. Spencer + ltx-koi8.rus - LaTeX to KOI8 + translit.c - TRANSLIT main program + translit.ps - TRANSLIT manual in PostScript + translit.1 - TRANSLIT manual in *roff + translit.txt - Plain ASCII TRANSLIT manual + + + + +JKL Last change: 22-Jan-1997 25 + + + + + + +TRANSLIT(JKL) Version 1.03 TRANSLIT(JKL) + + + + 2) You may expand/change the files and the program and + distribute modified files, provided that you do not + delete anything (you can always comment the unnecessary + portions out) and clearly mark your changes. Please send + the copy of the modified version to the author, though + you are not required to do so. I will give you all the + credit for your enhancements. I simply wish that there + is a single point of distribution for this code, so it + is maintained to some extent. If you create additional + transliteration definition files, please, send them to + the author if you may. I will add them to the program + distribution. I want to fix bugs and expand/optimize + this code, but I need your help. I need your transli- + teration files for languages which I do not know or do + not use currently. Your suggestions for improving docu- + mentation are most welcome (I am not a native English + speaker). + 3) You will not charge money for the program and/or asso- + ciated files, except for media and copying costs. If you + want to sell it, contact the author first. Bear in mind + that the regular expression package by Henry Spencer has + some copyright restrictions. But there are other regu- + lar expression packages which do not have these restric- + tions (which are not violated by this offering). + 4) I will gladly help you with advice on compiling this + software and try to fix bugs when time allows. However, + if you want a ready to run executable, you need to order + it for a very nominal fee from JKL ENTERPRISES, INC. as + described in the file order.txt which must be a part of + a complete distribution. + + +AUTHOR + Jan Labanowski, P.O. Box 21821, Columbus, OH 43221-0821, + USA. E-mail: jkl@osc.edu, JKL@OHSTPY.BITNET. + + + + + + + + + + + + + + + + + + + + +JKL Last change: 22-Jan-1997 26 + + + |