# Preloaded methods go here.
-$omegadb_path="/usr/local/lib/chise/omega";
+$omegadb_path="";
+unless($omegadb_path){
+ if(-w '/usr/local/share/chise/omega'){
+ $omegadb_path='/usr/local/share/chise/omega';
+ }elsif(-w '/usr/share/chise/omega'){
+ $omegadb_path='/usr/share/chise/omega';
+ }elsif(-w '/sw/share/chise/omega'){
+ $omegadb_path='/sw/share/chise/omega';
+ }elsif(-w '/usr/local/lib/chise/omega'){
+ $omegadb_path='/usr/local/lib/chise/omega';
+ }else{
+ $omegadb_path=".";
+ }
+}
my $DB_HOME="";
unless($DB_HOME){
- if(-e '/usr/local/lib/chise/chise-db'){
+ if(-e '/usr/local/share/chise/0.3/db'){
+ $DB_HOME='/usr/local/share/chise/0.3/db';
+ }elsif(-e '/usr/share/chise/0.3/db'){
+ $DB_HOME='/usr/share/chise/0.3/db';
+ }elsif(-e '/sw/share/chise/0.3/db'){
+ $DB_HOME='/sw/share/chise/0.3/db';
+ }elsif(-e '/usr/local/lib/chise/chise-db'){
$DB_HOME='/usr/local/lib/chise/chise-db';
}elsif(-e '/usr/lib/chise/chise-db'){
$DB_HOME='/usr/lib/chise/chise-db';
unless($db_opened{$atr}){
&get_db($atr) or return ();
}
+ utf8::encode($value);
foreach $char (keys %{$chardb{$atr}}){
if($chardb{$atr}->{$char}=~/$value/){
utf8::decode($char);
unless($rdb_opened{$atr}){
&get_reverse_db($atr) or return ();
}
+ utf8::encode($value);
if($char=$reverse_chardb{$atr}->{$value}){
utf8::decode($char);
$char=~s/^\?//;