#-------------------------------------------------------------------- # Copyright 2001-2009, CrossWire Bible Society (www.crosswire.org) # All rights reserved. Usage permitted according to the MIT/X11 # License: http://www.opensource.org/licenses/mit-license.php #-------------------------------------------------------------------- # Based on Quenya Mode as described at # http://hem.passagen.se/mansb/at/teng_quenya.htm #-------------------------------------------------------------------- # This transliterator first converts any Tengwar encoded in the # ConScript range # (http://www.evertype.com/standards/csur/tengwar.html) in the PUA to # its proposed Unicode position, according the the SMP roadmap # (http://www.evertype.com/standards/iso10646/pdf/tengwar.pdf). # The result is then transliterated to Latin. # The reverse transliterator maps first to the proposed Unicode # positions then to the ConScript PUA positions. Thus documents # encoded in either manner can be transliterated, and, while the # transliterator makes use of currently illegal characters, it only # outputs valid ones. #-------------------------------------------------------------------- # Tengwar-Latin/Quenya :: NFD (NFC); $letters = [\u13000-\u13024]; # "$single = [\u13000-\u13003 \u13008-\u1300B \u13014-\u13017 \u1301C-\u13023 \u13028-\u1302B \u13030-\u13033];" # "$double = [\u13004-\u13007 \u1300C-\u13013 \u13018-\u1301B \u13024-\u13027 \u1302C-\u1302F];" \uE000>\u13000; \uE001>\u13001; \uE002>\u13002; \uE003>\u13003; \uE004>\u13004; \uE005>\u13005; \uE006>\u13006; \uE007>\u13007; \uE008>\u13008; \uE009>\u13009; \uE00A>\u1300A; \uE00B>\u1300B; \uE00C>\u1300C; \uE00D>\u1300D; \uE00E>\u1300E; \uE00F>\u1300F; \uE010>\u13010; \uE011>\u13011; \uE012>\u13012; \uE013>\u13013; \uE014>\u13014; \uE015>\u13015; \uE016>\u13016; \uE017>\u13017; \uE018>\u13018; \uE019>\u13019; \uE01A>\u1301A; \uE01B>\u1301B; \uE01C>\u1301C; \uE01D>\u1301D; \uE01E>\u1301E; \uE01F>\u1301F; \uE020>\u13020; \uE021>\u13021; \uE022>\u13022; \uE023>\u13023; \uE024>\u13024; \uE025>\u13025; \uE026>\u13026; \uE027>\u13027; \uE028>\u13028; \uE029>\u13029; \uE02A>\u1302A; \uE02B>\u1302B; \uE02C>\u1302C; \uE02D>\u1302D; \uE02E>\u1302E; \uE02F>\u1302F; \uE030>\u13030; \uE031>\u13031; \uE032>\u13032; \uE033>\u13033; \uE040>\u13040; \uE041>\u13041; \uE042>\u13042; \uE043>\u13043; \uE044>\u13044; \uE045>\u13045; \uE046>\u13046; \uE047>\u13047; \uE048>\u13048; \uE049>\u13049; \uE04A>\u1304A; \uE04B>\u1304B; \uE04C>\u1304C; \uE04D>\u1304D; \uE04E>\u1304E; \uE04F>\u1304F; \uE050>\u13050; \uE051>\u13051; \uE052>\u13052; \uE053>\u13053; \uE054>\u13054; \uE055>\u13055; \uE056>\u13056; \uE057>\u13057; \uE058>\u13058; \uE05A>\u1305A; \uE05C>\u1305C; \uE05D>\u1305D; \uE062>\u13062; \uE063>\u13063; \uE064>\u13064; \uE065>\u13065; \uE066>\u13066; \uE067>\u13067; \uE068>\u13068; \uE069>\u13069; \uE06A>\u1306A; \uE06B>\u1306B; \uE06C>\u1306C; \uE06D>\u1306D; \uE06E>\u1306E; ($letter)[\u13054\u13055]>|$1 $1; \u13007<>ngw; \u1300F<>nqu; \u13003<>qu; \u13004<>nd; \u13005<>mb; \u13006<>ng; \u13008<>th; \u1300B<>hw; \u1300C<>nt; \u1300D<>mp; \u1300E<>nc; \u13013<>nw; \u13019<>rd; \u1301B<>ld; \u13020<>hy; \u13021<>hw; \u13000<>t; \u13001<>p; \u13002<>c; \u13009<>f; \u1300A<>h; \u13010<>n; \u13011<>m; \u13012<>n; \u13014<>r; \u13015<>v; \u13016>; \u13017<>w; \u13018<>r; \u1301A<>l; \u1301C<>s; \u1301D<>s; \u1301E<>z; \u1301F<>z; \u13022<>i; \u13023<>u; \u13024<>h; \u13027>; \u13028>; \u13029>; \u1302A>; \u1302B>; \u1302C>; \u1302D>; \u1302E>; \u1302F>; \u13030<>0; \u13031>; \u13032>; \u13033<>1; \u13025\u13040<>a; \u13025\u13044<>i; \u13025\u13046<>e; \u13025\u13048<>o; \u13025\u1304A<>u; \u13026\u13040<>á; \u13026\u13044<>í; \u13026\u13046<>é; \u13026\u13048<>ó; \u13026\u1304A<>ú; \u13041<>y; \u13042>í; \u13043<>y; \u13045>á; \u13047>é; \u13049>ó; \u1304B>ú; \u1304C>; \u1304D>; \u1304E>; \u1304F>; \u13025>; \u13026>; \u13050<>'.'; \u13051<>':'; \u13052<>'!'; \u13053<>'?'; \u13054<>'-'; \u13055<>'--'; \u13056>; \u13057>; \u13058>; \u1305A>; \u1305C>s; \u1305D>s; \u13062<>2; \u13063<>3; \u13064<>4; \u13065<>5; \u13066<>6; \u13067<>7; \u13068<>8; \u13069<>9; \u1306A<>A; \u1306B<>B; \u1306C>; \u1306D>; \u1306E>; \uE000<\u13000; \uE001<\u13001; \uE002<\u13002; \uE003<\u13003; \uE004<\u13004; \uE005<\u13005; \uE006<\u13006; \uE007<\u13007; \uE008<\u13008; \uE009<\u13009; \uE00A<\u1300A; \uE00B<\u1300B; \uE00C<\u1300C; \uE00D<\u1300D; \uE00E<\u1300E; \uE00F<\u1300F; \uE010<\u13010; \uE011<\u13011; \uE012<\u13012; \uE013<\u13013; \uE014<\u13014; \uE015<\u13015; \uE016<\u13016; \uE017<\u13017; \uE018<\u13018; \uE019<\u13019; \uE01A<\u1301A; \uE01B<\u1301B; \uE01C<\u1301C; \uE01D<\u1301D; \uE01E<\u1301E; \uE01F<\u1301F; \uE020<\u13020; \uE021<\u13021; \uE022<\u13022; \uE023<\u13023; \uE024<\u13024; \uE025<\u13025; \uE026<\u13026; \uE027<\u13027; \uE028<\u13028; \uE029<\u13029; \uE02A<\u1302A; \uE02B<\u1302B; \uE02C<\u1302C; \uE02D<\u1302D; \uE02E<\u1302E; \uE02F<\u1302F; \uE030<\u13030; \uE031<\u13031; \uE032<\u13032; \uE033<\u13033; \uE040<\u13040; \uE041<\u13041; \uE042<\u13042; \uE043<\u13043; \uE044<\u13044; \uE045<\u13045; \uE046<\u13046; \uE047<\u13047; \uE048<\u13048; \uE049<\u13049; \uE04A<\u1304A; \uE04B<\u1304B; \uE04C<\u1304C; \uE04D<\u1304D; \uE04E<\u1304E; \uE04F<\u1304F; \uE050<\u13050; \uE051<\u13051; \uE052<\u13052; \uE053<\u13053; \uE054<\u13054; \uE055<\u13055; \uE056<\u13056; \uE057<\u13057; \uE058<\u13058; \uE05A<\u1305A; \uE05C<\u1305C; \uE05D<\u1305D; \uE062<\u13062; \uE063<\u13063; \uE064<\u13064; \uE065<\u13065; \uE066<\u13066; \uE067<\u13067; \uE068<\u13068; \uE069<\u13069; \uE06A<\u1306A; \uE06B<\u1306B; \uE06C<\u1306C; \uE06D<\u1306D; \uE06E<\u1306E; :: (lower); :: NFC (NFD);