"; exit(); } $char="&#x".$value.";"; ?> :: UNICODE database search results :: eof()) { $test = $file->current(); if(strpos($test, $search)!== false) { $result_array[] = $file->current(); } $file->next(); } return $result_array; } $search = "U+".$value; $base_file = "Unihan_DictionaryIndices.txt"; buildArray($base_file, $search); $base_file = "Unihan_DictionaryLikeData.txt"; buildArray($base_file, $search); $base_file = "Unihan_IRGSources.txt"; buildArray($base_file, $search); $base_file = "Unihan_NumericValues.txt"; buildArray($base_file, $search); $base_file = "Unihan_OtherMappings.txt"; buildArray($base_file, $search); $base_file = "Unihan_RadicalStrokeCounts.txt"; buildArray($base_file, $search); $base_file = "Unihan_Readings.txt"; buildArray($base_file, $search); $base_file = "Unihan_Variants.txt"; buildArray($base_file, $search); for ($i = 0; $i < sizeof($result_array); $i++) { if (preg_match("/kAlternateKangXi/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kAlternateKangXi = $split[2]; } if (preg_match("/kHanyu/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kHanyu = $split[2]; } if (preg_match("/kKangXi/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kKangXi = $split[2]; } if (preg_match("/kCihaiT/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCihaiT = $split[2]; } if (preg_match("/kMatthews/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kMatthews = $split[2]; } if (preg_match("/kBigFive/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kBig5 = $split[2]; } if (preg_match("/kHKSCS/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kHKSCS = $split[2]; } if (preg_match("/kCCCII/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCCCII = $split[2]; } if (preg_match("/kCNS1986/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCNS1986 = $split[2]; } if (preg_match("/kCNS1992/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCNS1992 = $split[2]; } if (preg_match("/kEACC/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kEACC = $split[2]; } if (preg_match("/kGB0/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB0 = $split[2]; } if (preg_match("/kGB1/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB1 = $split[2]; } if (preg_match("/kGB3/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB3 = $split[2]; } if (preg_match("/kGB5/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB5 = $split[2]; } if (preg_match("/kGB7/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB7 = $split[2]; } if (preg_match("/kGB8/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kGB8 = $split[2]; } if (preg_match("/kTaiwanTelegraph/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kTaiwanTelegraph = $split[2]; } if (preg_match("/kCangJie/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCangJie = $split[2]; } if (preg_match("/kCantonese/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kCantonese = $split[2]; } if (preg_match("/kMandarin/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kMandarin = $split[2]; } if (preg_match("/kTang/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kTang = $split[2]; } if (preg_match("/kDefinition/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kDefinition = $split[2]; } if (preg_match("/kFrequency/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kFrequency = $split[2]; } if (preg_match("/kTotalStrokes/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kTotalStrokes = $split[2]; } if (preg_match("/kRSKangXi/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kRSKangxi = $split[2]; } if (preg_match("/kRSUnicode/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kRSUnicode = $split[2]; } if (preg_match("/kZVariant/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kZVariant = $split[2]; } if (preg_match("/kSemanticVariant/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kSemanticVariant = $split[2]; } if (preg_match("/kSimplifiedVariant/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kSimplifiedVariant = preg_replace("/U\+/","",$split[2]); } if (preg_match("/kTraditionalVariant/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kTraditionalVariant = preg_replace("/U\+/","",$split[2]); } if (preg_match("/kSpecializedSemanticVariant/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kSpecializedSemanticVariant = $split[2]; } if (preg_match("/kHKGlyph/i",$result_array[$i])) { $split = preg_split("/\t/",$result_array[$i],3); $kHKGlyph = $split[2]; } }//end for function get_trad($tradvar) { $trad=preg_split('/ /',$tradvar); for ($i = 0; $i < sizeof($trad); $i++) { $trad[$i]="".strip($trad[$i]).""; $result=$result." ".$trad[$i]; } return $result; } function get_simp($simpvar) { $simp=preg_split('/ /',$simpvar); for ($i = 0; $i < sizeof($simp); $i++) { $simp[$i]="".strip($simp[$i]).""; $result=$result." ".$simp[$i]; } return $result; } function strip($to_strip) { $to_strip=ereg_replace("[U+]|\n","",$to_strip); $to_strip="&#x".$to_strip.";"; return $to_strip; } //print_r($result_array); ?>
General information
"; if ($kFrequency) echo "Frequency = $kFrequency
"; if ($kTotalStrokes) echo "Total Strokes = $kTotalStrokes
"; if ($kSimplifiedVariant) echo "Simplified Variant =".get_simp($kSimplifiedVariant)." ($kSimplifiedVariant)
"; if ($kTraditionalVariant) echo "Traditional Variant =".get_trad($kTraditionalVariant)." ($kTraditionalVariant)
"; ?>
Dictionary entries
"; if ($kKangXi) echo "KangXi = $kKangXi
"; if ($kAlternateKangXi) echo "KangXi (alt.) = $kAlternateKangXi
"; if ($kCihaiT) echo "Cihai = $kCihaiT
"; if ($kMatthews) echo "Matthews = $kMatthews
"; ?>
Codepoints
"; if ($kHKSCS) echo "HKSCS = $kHKSCS
"; if ($kCCCII) echo "CCCII = $kCCCII
"; if ($kCNS1986) echo "CNS-1986 = $kCNS1986
"; if ($kCNS1992) echo "CNS-1992 = $kCNS1992
"; if ($kEACC) echo "EACC = $kEACC
"; if ($kGB0) echo "GB 2312-80 = $kGB0
"; if ($kGB1) echo "GB 12345-90 = $kGB1
"; if ($kGB3) echo "GB 7589-87 = $kGB3
"; if ($kGB5) echo "GB 7590-87 = $kGB5
"; if ($kGB7) echo "General Use for Modern Chinese = $kGB7
"; if ($kGB8) echo "GB 8565-89 = $kGB8
"; if ($kTaiwanTelegraph) echo "Taiwan Telegraph = $kTaiwanTelegraph
"; ?>
Pronounciation & Input Methods
"; if ($kMandarin) echo "Mandarin = ".convert_to_unicode(strtolower($kMandarin))."
"; if ($kTang) echo "Tang = ".strtolower($kTang)."
"; if ($kCangjie) echo "Cangjie = $kCangjie
"; ?>
Other
"; if ($kRSUnicode) echo "Radical/Stroke count Unicode = $kRSUnicode
"; if ($kZVariant) echo "Variant = $kZVariant
"; if ($kSemanticVariant) echo "Semantic variant = $kSemanticVariant
"; if ($kSpecializedSemanticVariant) echo "Specialized Semantic Variant = $kSpecializedSemanticVariant
"; if ($kHKGlyph) echo "HK Glyph= $kHKGlyph
"; if ($kIRG_JSource) echo "IRG Japan = $kIRG_JSource
"; if ($kIRG_KSource) echo "IRG Korea = $kIRG_KSource
"; if ($kIRG_KPSource) echo "IRG N-Korea = $kIRG_KPSource
"; if ($kIRG_TSource) echo "IRG Traditional Chinese = $kIRG_TSource
"; if ($kIRG_VSource) echo "IRG Vietnam = $kIRG_VSource
"; ?>

[ back ]