--- a/tcpdf/unicode_data.php +++ b/tcpdf/unicode_data.php @@ -1,1 +1,18372 @@ +<?php +//============================================================+ +// File name : unicode_data.php +// Version : 1.0.007 +// Begin : 2008-01-01 +// Last Update : 2010-12-16 +// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com +// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) +// ------------------------------------------------------------------- +// Copyright (C) 2008-2010 Nicola Asuni - Tecnick.com S.r.l. +// +// This file is part of TCPDF software library. +// +// TCPDF is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// TCPDF is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with TCPDF. If not, see <http://www.gnu.org/licenses/>. +// +// See LICENSE.TXT file for more information. +// ------------------------------------------------------------------- +// +// Description : Unicode data for TCPDF library. +// +//============================================================+ +// THANKS TO +// Efthimios Mavrogeorgiadis +// Saleh AlMatrafe +/** + * @file + * Unicode data class for TCPDF library. + * @author Nicola Asuni + * @package com.tecnick.tcpdf + * @since 2.1.000 (2008-01-08) + */ + +/** + * @class TCPDF_UNICODE_DATA + * This is a PHP class containing Unicde data for TCPDF library + * @package com.tecnick.tcpdf + * @version 1.0.007 + * @author Nicola Asuni - info@tecnick.com + */ +class TCPDF_UNICODE_DATA { + +/** + * Unicode code for Left-to-Right Mark. + * @public + */ +public $uni_LRM = 8206; + +/** + * Unicode code for Right-to-Left Mark. + * @public + */ +public $uni_RLM = 8207; + +/** + * Unicode code for Left-to-Right Embedding. + * @public + */ +public $uni_LRE = 8234; + +/** + * Unicode code for Right-to-Left Embedding. + * @public + */ +public $uni_RLE = 8235; + +/** + * Unicode code for Pop Directional Format. + * @public + */ +public $uni_PDF = 8236; + +/** + * Unicode code for Left-to-Right Override. + * @public + */ +public $uni_LRO = 8237; + +/** + * Unicode code for Right-to-Left Override. + * @public + */ +public $uni_RLO = 8238; + +/** + * Pattern to test RTL (Righ-To-Left) strings using regular expressions. + * @public + */ +public $uni_RE_PATTERN_RTL = "/( + \xD6\xBE # R + | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R + | \xDF[\x80-\xAA\xB4\xB5\xBA] # R + | \xE2\x80\x8F # R + | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE] # R + | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F] # R + | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R + | \xF0\x90\xA4[\x80-\x99] # R + | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R + | \xF0\x90\xA9[\x80-\x87\x90-\x98] # R + | \xE2\x80[\xAB\xAE] # RLE & RLO + )/x"; + +/** + * Pattern to test Arabic strings using regular expressions. Source: http://www.w3.org/International/questions/qa-forms-utf-8 + * @public + */ +public $uni_RE_PATTERN_ARABIC = "/( + \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL + | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL + | \xDA[\x80-\xBF] # AL + | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF] # AL + | \xDC[\x80-\x8D\x90\x92-\xAF] # AL + | \xDD[\x8D-\xAD] # AL + | \xDE[\x80-\xA5\xB1] # AL + | \xEF\xAD[\x90-\xBF] # AL + | \xEF\xAE[\x80-\xB1] # AL + | \xEF\xAF[\x93-\xBF] # AL + | \xEF[\xB0-\xB3][\x80-\xBF] # AL + | \xEF\xB4[\x80-\xBD] # AL + | \xEF\xB5[\x90-\xBF] # AL + | \xEF\xB6[\x80-\x8F\x92-\xBF] # AL + | \xEF\xB7[\x80-\x87\xB0-\xBC] # AL + | \xEF\xB9[\xB0-\xB4\xB6-\xBF] # AL + | \xEF\xBA[\x80-\xBF] # AL + | \xEF\xBB[\x80-\xBC] # AL + | \xD9[\xA0-\xA9\xAB\xAC] # AN + )/x"; + +/** + * Array of Unicode types. + * @public + */ +public $uni_type = array( +0=>'BN', +1=>'BN', +2=>'BN', +3=>'BN', +4=>'BN', +5=>'BN', +6=>'BN', +7=>'BN', +8=>'BN', +9=>'S', +10=>'B', +11=>'S', +12=>'WS', +13=>'B', +14=>'BN', +15=>'BN', +16=>'BN', +17=>'BN', +18=>'BN', +19=>'BN', +20=>'BN', +21=>'BN', +22=>'BN', +23=>'BN', +24=>'BN', +25=>'BN', +26=>'BN', +27=>'BN', +28=>'B', +29=>'B', +30=>'B', +31=>'S', +32=>'WS', +33=>'ON', +34=>'ON', +35=>'ET', +36=>'ET', +37=>'ET', +38=>'ON', +39=>'ON', +40=>'ON', +41=>'ON', +42=>'ON', +43=>'ES', +44=>'CS', +45=>'ES', +46=>'CS', +47=>'CS', +48=>'EN', +49=>'EN', +50=>'EN', +51=>'EN', +52=>'EN', +53=>'EN', +54=>'EN', +55=>'EN', +56=>'EN', +57=>'EN', +58=>'CS', +59=>'ON', +60=>'ON', +61=>'ON', +62=>'ON', +63=>'ON', +64=>'ON', +65=>'L', +66=>'L', +67=>'L', +68=>'L', +69=>'L', +70=>'L', +71=>'L', +72=>'L', +73=>'L', +74=>'L', +75=>'L', +76=>'L', +77=>'L', +78=>'L', +79=>'L', +80=>'L', +81=>'L', +82=>'L', +83=>'L', +84=>'L', +85=>'L', +86=>'L', +87=>'L', +88=>'L', +89=>'L', +90=>'L', +91=>'ON', +92=>'ON', +93=>'ON', +94=>'ON', +95=>'ON', +96=>'ON', +97=>'L', +98=>'L', +99=>'L', +100=>'L', +101=>'L', +102=>'L', +103=>'L', +104=>'L', +105=>'L', +106=>'L', +107=>'L', +108=>'L', +109=>'L', +110=>'L', +111=>'L', +112=>'L', +113=>'L', +114=>'L', +115=>'L', +116=>'L', +117=>'L', +118=>'L', +119=>'L', +120=>'L', +121=>'L', +122=>'L', +123=>'ON', +124=>'ON', +125=>'ON', +126=>'ON', +127=>'BN', +128=>'BN', +129=>'BN', +130=>'BN', +131=>'BN', +132=>'BN', +133=>'B', +134=>'BN', +135=>'BN', +136=>'BN', +137=>'BN', +138=>'BN', +139=>'BN', +140=>'BN', +141=>'BN', +142=>'BN', +143=>'BN', +144=>'BN', +145=>'BN', +146=>'BN', +147=>'BN', +148=>'BN', +149=>'BN', +150=>'BN', +151=>'BN', +152=>'BN', +153=>'BN', +154=>'BN', +155=>'BN', +156=>'BN', +157=>'BN', +158=>'BN', +159=>'BN', +160=>'CS', +161=>'ON', +162=>'ET', +163=>'ET', +164=>'ET', +165=>'ET', +166=>'ON', +167=>'ON', +168=>'ON', +169=>'ON', +170=>'L', +171=>'ON', +172=>'ON', +173=>'BN', +174=>'ON', +175=>'ON', +176=>'ET', +177=>'ET', +178=>'EN', +179=>'EN', +180=>'ON', +181=>'L', +182=>'ON', +183=>'ON', +184=>'ON', +185=>'EN', +186=>'L', +187=>'ON', +188=>'ON', +189=>'ON', +190=>'ON', +191=>'ON', +192=>'L', +193=>'L', +194=>'L', +195=>'L', +196=>'L', +197=>'L', +198=>'L', +199=>'L', +200=>'L', +201=>'L', +202=>'L', +203=>'L', +204=>'L', +205=>'L', +206=>'L', +207=>'L', +208=>'L', +209=>'L', +210=>'L', +211=>'L', +212=>'L', +213=>'L', +214=>'L', +215=>'ON', +216=>'L', +217=>'L', +218=>'L', +219=>'L', +220=>'L', +221=>'L', +222=>'L', +223=>'L', +224=>'L', +225=>'L', +226=>'L', +227=>'L', +228=>'L', +229=>'L', +230=>'L', +231=>'L', +232=>'L', +233=>'L', +234=>'L', +235=>'L', +236=>'L', +237=>'L', +238=>'L', +239=>'L', +240=>'L', +241=>'L', +242=>'L', +243=>'L', +244=>'L', +245=>'L', +246=>'L', +247=>'ON', +248=>'L', +249=>'L', +250=>'L', +251=>'L', +252=>'L', +253=>'L', +254=>'L', +255=>'L', +256=>'L', +257=>'L', +258=>'L', +259=>'L', +260=>'L', +261=>'L', +262=>'L', +263=>'L', +264=>'L', +265=>'L', +266=>'L', +267=>'L', +268=>'L', +269=>'L', +270=>'L', +271=>'L', +272=>'L', +273=>'L', +274=>'L', +275=>'L', +276=>'L', +277=>'L', +278=>'L', +279=>'L', +280=>'L', +281=>'L', +282=>'L', +283=>'L', +284=>'L', +285=>'L', +286=>'L', +287=>'L', +288=>'L', +289=>'L', +290=>'L', +291=>'L', +292=>'L', +293=>'L', +294=>'L', +295=>'L', +296=>'L', +297=>'L', +298=>'L', +299=>'L', +300=>'L', +301=>'L', +302=>'L', +303=>'L', +304=>'L', +305=>'L', +306=>'L', +307=>'L', +308=>'L', +309=>'L', +310=>'L', +311=>'L', +312=>'L', +313=>'L', +314=>'L', +315=>'L', +316=>'L', +317=>'L', +318=>'L', +319=>'L', +320=>'L', +321=>'L', +322=>'L', +323=>'L', +324=>'L', +325=>'L', +326=>'L', +327=>'L', +328=>'L', +329=>'L', +330=>'L', +331=>'L', +332=>'L', +333=>'L', +334=>'L', +335=>'L', +336=>'L', +337=>'L', +338=>'L', +339=>'L', +340=>'L', +341=>'L', +342=>'L', +343=>'L', +344=>'L', +345=>'L', +346=>'L', +347=>'L', +348=>'L', +349=>'L', +350=>'L', +351=>'L', +352=>'L', +353=>'L', +354=>'L', +355=>'L', +356=>'L', +357=>'L', +358=>'L', +359=>'L', +360=>'L', +361=>'L', +362=>'L', +363=>'L', +364=>'L', +365=>'L', +366=>'L', +367=>'L', +368=>'L', +369=>'L', +370=>'L', +371=>'L', +372=>'L', +373=>'L', +374=>'L', +375=>'L', +376=>'L', +377=>'L', +378=>'L', +379=>'L', +380=>'L', +381=>'L', +382=>'L', +383=>'L', +384=>'L', +385=>'L', +386=>'L', +387=>'L', +388=>'L', +389=>'L', +390=>'L', +391=>'L', +392=>'L', +393=>'L', +394=>'L', +395=>'L', +396=>'L', +397=>'L', +398=>'L', +399=>'L', +400=>'L', +401=>'L', +402=>'L', +403=>'L', +404=>'L', +405=>'L', +406=>'L', +407=>'L', +408=>'L', +409=>'L', +410=>'L', +411=>'L', +412=>'L', +413=>'L', +414=>'L', +415=>'L', +416=>'L', +417=>'L', +418=>'L', +419=>'L', +420=>'L', +421=>'L', +422=>'L', +423=>'L', +424=>'L', +425=>'L', +426=>'L', +427=>'L', +428=>'L', +429=>'L', +430=>'L', +431=>'L', +432=>'L', +433=>'L', +434=>'L', +435=>'L', +436=>'L', +437=>'L', +438=>'L', +439=>'L', +440=>'L', +441=>'L', +442=>'L', +443=>'L', +444=>'L', +445=>'L', +446=>'L', +447=>'L', +448=>'L', +449=>'L', +450=>'L', +451=>'L', +452=>'L', +453=>'L', +454=>'L', +455=>'L', +456=>'L', +457=>'L', +458=>'L', +459=>'L', +460=>'L', +461=>'L', +462=>'L', +463=>'L', +464=>'L', +465=>'L', +466=>'L', +467=>'L', +468=>'L', +469=>'L', +470=>'L', +471=>'L', +472=>'L', +473=>'L', +474=>'L', +475=>'L', +476=>'L', +477=>'L', +478=>'L', +479=>'L', +480=>'L', +481=>'L', +482=>'L', +483=>'L', +484=>'L', +485=>'L', +486=>'L', +487=>'L', +488=>'L', +489=>'L', +490=>'L', +491=>'L', +492=>'L', +493=>'L', +494=>'L', +495=>'L', +496=>'L', +497=>'L', +498=>'L', +499=>'L', +500=>'L', +501=>'L', +502=>'L', +503=>'L', +504=>'L', +505=>'L', +506=>'L', +507=>'L', +508=>'L', +509=>'L', +510=>'L', +511=>'L', +512=>'L', +513=>'L', +514=>'L', +515=>'L', +516=>'L', +517=>'L', +518=>'L', +519=>'L', +520=>'L', +521=>'L', +522=>'L', +523=>'L', +524=>'L', +525=>'L', +526=>'L', +527=>'L', +528=>'L', +529=>'L', +530=>'L', +531=>'L', +532=>'L', +533=>'L', +534=>'L', +535=>'L', +536=>'L', +537=>'L', +538=>'L', +539=>'L', +540=>'L', +541=>'L', +542=>'L', +543=>'L', +544=>'L', +545=>'L', +546=>'L', +547=>'L', +548=>'L', +549=>'L', +550=>'L', +551=>'L', +552=>'L', +553=>'L', +554=>'L', +555=>'L', +556=>'L', +557=>'L', +558=>'L', +559=>'L', +560=>'L', +561=>'L', +562=>'L', +563=>'L', +564=>'L', +565=>'L', +566=>'L', +567=>'L', +568=>'L', +569=>'L', +570=>'L', +571=>'L', +572=>'L', +573=>'L', +574=>'L', +575=>'L', +576=>'L', +577=>'L', +578=>'L', +579=>'L', +580=>'L', +581=>'L', +582=>'L', +583=>'L', +584=>'L', +585=>'L', +586=>'L', +587=>'L', +588=>'L', +589=>'L', +590=>'L', +591=>'L', +592=>'L', +593=>'L', +594=>'L', +595=>'L', +596=>'L', +597=>'L', +598=>'L', +599=>'L', +600=>'L', +601=>'L', +602=>'L', +603=>'L', +604=>'L', +605=>'L', +606=>'L', +607=>'L', +608=>'L', +609=>'L', +610=>'L', +611=>'L', +612=>'L', +613=>'L', +614=>'L', +615=>'L', +616=>'L', +617=>'L', +618=>'L', +619=>'L', +620=>'L', +621=>'L', +622=>'L', +623=>'L', +624=>'L', +625=>'L', +626=>'L', +627=>'L', +628=>'L', +629=>'L', +630=>'L', +631=>'L', +632=>'L', +633=>'L', +634=>'L', +635=>'L', +636=>'L', +637=>'L', +638=>'L', +639=>'L', +640=>'L', +641=>'L', +642=>'L', +643=>'L', +644=>'L', +645=>'L', +646=>'L', +647=>'L', +648=>'L', +649=>'L', +650=>'L', +651=>'L', +652=>'L', +653=>'L', +654=>'L', +655=>'L', +656=>'L', +657=>'L', +658=>'L', +659=>'L', +660=>'L', +661=>'L', +662=>'L', +663=>'L', +664=>'L', +665=>'L', +666=>'L', +667=>'L', +668=>'L', +669=>'L', +670=>'L', +671=>'L', +672=>'L', +673=>'L', +674=>'L', +675=>'L', +676=>'L', +677=>'L', +678=>'L', +679=>'L', +680=>'L', +681=>'L', +682=>'L', +683=>'L', +684=>'L', +685=>'L', +686=>'L', +687=>'L', +688=>'L', +689=>'L', +690=>'L', +691=>'L', +692=>'L', +693=>'L', +694=>'L', +695=>'L', +696=>'L', +697=>'ON', +698=>'ON', +699=>'L', +700=>'L', +701=>'L', +702=>'L', +703=>'L', +704=>'L', +705=>'L', +706=>'ON', +707=>'ON', +708=>'ON', +709=>'ON', +710=>'ON', +711=>'ON', +712=>'ON', +713=>'ON', +714=>'ON', +715=>'ON', +716=>'ON', +717=>'ON', +718=>'ON', +719=>'ON', +720=>'L', +721=>'L', +722=>'ON', +723=>'ON', +724=>'ON', +725=>'ON', +726=>'ON', +727=>'ON', +728=>'ON', +729=>'ON', +730=>'ON', +731=>'ON', +732=>'ON', +733=>'ON', +734=>'ON', +735=>'ON', +736=>'L', +737=>'L', +738=>'L', +739=>'L', +740=>'L', +741=>'ON', +742=>'ON', +743=>'ON', +744=>'ON', +745=>'ON', +746=>'ON', +747=>'ON', +748=>'ON', +749=>'ON', +750=>'L', +751=>'ON', +752=>'ON', +753=>'ON', +754=>'ON', +755=>'ON', +756=>'ON', +757=>'ON', +758=>'ON', +759=>'ON', +760=>'ON', +761=>'ON', +762=>'ON', +763=>'ON', +764=>'ON', +765=>'ON', +766=>'ON', +767=>'ON', +768=>'NSM', +769=>'NSM', +770=>'NSM', +771=>'NSM', +772=>'NSM', +773=>'NSM', +774=>'NSM', +775=>'NSM', +776=>'NSM', +777=>'NSM', +778=>'NSM', +779=>'NSM', +780=>'NSM', +781=>'NSM', +782=>'NSM', +783=>'NSM', +784=>'NSM', +785=>'NSM', +786=>'NSM', +787=>'NSM', +788=>'NSM', +789=>'NSM', +790=>'NSM', +791=>'NSM', +792=>'NSM', +793=>'NSM', +794=>'NSM', +795=>'NSM', +796=>'NSM', +797=>'NSM', +798=>'NSM', +799=>'NSM', +800=>'NSM', +801=>'NSM', +802=>'NSM', +803=>'NSM', +804=>'NSM', +805=>'NSM', +806=>'NSM', +807=>'NSM', +808=>'NSM', +809=>'NSM', +810=>'NSM', +811=>'NSM', +812=>'NSM', +813=>'NSM', +814=>'NSM', +815=>'NSM', +816=>'NSM', +817=>'NSM', +818=>'NSM', +819=>'NSM', +820=>'NSM', +821=>'NSM', +822=>'NSM', +823=>'NSM', +824=>'NSM', +825=>'NSM', +826=>'NSM', +827=>'NSM', +828=>'NSM', +829=>'NSM', +830=>'NSM', +831=>'NSM', +832=>'NSM', +833=>'NSM', +834=>'NSM', +835=>'NSM', +836=>'NSM', +837=>'NSM', +838=>'NSM', +839=>'NSM', +840=>'NSM', +841=>'NSM', +842=>'NSM', +843=>'NSM', +844=>'NSM', +845=>'NSM', +846=>'NSM', +847=>'NSM', +848=>'NSM', +849=>'NSM', +850=>'NSM', +851=>'NSM', +852=>'NSM', +853=>'NSM', +854=>'NSM', +855=>'NSM', +856=>'NSM', +857=>'NSM', +858=>'NSM', +859=>'NSM', +860=>'NSM', +861=>'NSM', +862=>'NSM', +863=>'NSM', +864=>'NSM', +865=>'NSM', +866=>'NSM', +867=>'NSM', +868=>'NSM', +869=>'NSM', +870=>'NSM', +871=>'NSM', +872=>'NSM', +873=>'NSM', +874=>'NSM', +875=>'NSM', +876=>'NSM', +877=>'NSM', +878=>'NSM', +879=>'NSM', +884=>'ON', +885=>'ON', +890=>'L', +891=>'L', +892=>'L', +893=>'L', +894=>'ON', +900=>'ON', +901=>'ON', +902=>'L', +903=>'ON', +904=>'L', +905=>'L', +906=>'L', +908=>'L', +910=>'L', +911=>'L', +912=>'L', +913=>'L', +914=>'L', +915=>'L', +916=>'L', +917=>'L', +918=>'L', +919=>'L', +920=>'L', +921=>'L', +922=>'L', +923=>'L', +924=>'L', +925=>'L', +926=>'L', +927=>'L', +928=>'L', +929=>'L', +931=>'