This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
function getTable($fn, &$tbl) | |
{ | |
foreach(file($fn) as $line) { | |
if(1 === preg_match('/(.+)\t(.+)/', $line, $m) ) | |
$tbl[$m[1]] = $m[2]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
あきのたの かりほのいほの とまをあらみ わがころもでは つゆにぬれつつ | |
はるすぎて なつきにけらし しろたへの ころもほすてふ あまのかぐやま | |
あしびきの やまどりのをの しだりをの ながながしよを ひとりかもねむ | |
たごのうらに うちいでてみれば しろたへの ふじのたかねに ゆきはふりつつ | |
おくやまに もみぢふみわけ なくしかの こゑきくときぞ あきはかなしき | |
かささぎの わたせるはしに おくしもの しろきをみれば よぞふけにける | |
あまのはら ふりさけみれば かすがなる みかさのやまに いでしつきかも | |
わがいほは みやこのたつみ しかぞすむ よをうぢやまと ひとはいふなり | |
はなのいろは うつりにけりな いたづらに わがみよにふる ながめせしまに | |
これやこの ゆくもかへるも わかれては しるもしらぬも あふさかのせき |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
function doFile ($filename) { | |
foreach(file($filename) as $line) { | |
// copied from gettextsbylanguage1() in lcwo/inc/functions.php | |
echo preg_replace_callback( '/&#(\d+);/', function ($m) { return mb_chr($m[1]); }, $line); | |
} | |
} |