home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
2.x
/
plum2_15_2.lzh
/
module
/
server
/
kanji.plm
Wrap
Text File
|
1997-12-13
|
2KB
|
82 lines
# <!-- -*- perl -*-
# $Id: kanji.plm,v 2.2 1997/12/13 13:45:25 hasegawa Exp $
# copyright (c)1997 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package server_kanji;
$_ = 'server_kanji';
sub server_read {
local($serverno, $line) = @_;
foreach $kanji (&'property($'userno[$serverno], 'input')) {
foreach $code (split(/\,/, $kanji)) {
if ("\L$code\E" eq 'euc') {
$line = &'euc_jis($line);
} elsif ("\L$code\E" eq 'jis') {
$line = &'jis_jis($line);
} elsif ("\L$code\E" eq 'sjis') {
$line = &'sjis_jis($line);
}
}
}
return $line;
}
sub server_write {
local($serverno, $line) = @_;
local($kanji);
$kanji = &'property($'userno[$serverno], 'output');
if ($kanji) {
if ("\L$kanji\E" eq 'euc') {
$line = &'jis_euc($line);
} elsif ("\L$kanji\E" eq 'jis') {
$line = &'jis_jis($line);
} elsif ("\L$kanji\E" eq 'sjis') {
$line = &'jis_sjis($line);
}
}
return $line;
}
__END__
--><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE> server/kanji.plm </TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3> $BL>A0(B </H3>
server/kanji.plm - $B%5!<%P$H$NF~=PNO$G4A;z%3!<%I$rJQ49$9$k(B
<HR><H3> $B@bL@(B </H3>
$B%5!<%P$+$i(BJIS$B0J30$GF~NO$5$l$?4A;z%3!<%I$r(BJIS$B$KJQ49$7$^$9!#(B
$B$^$?%5!<%P$KBP$7$F=PNO$9$k4A;z%3!<%I$r;XDj$7$?$b$N$K$7$^$9!#(B
<HR><H3> $B%W%m%Q%F%#(B </H3>
<DL>
<DT> server.kanji.input* ({euc|jis|sjis})
<DD> $B%5!<%P$+$i$NF~NO$,;XDj$7$?4A;z%3!<%I$N$b$N$G$"$l$P!"(B
$B$=$l$r(BJIS$B$KJQ49$7$^$9!#(BEUC$B$H(BSJIS$B$OF1;~$K;XDj$G$-$^$;$s!#(B
<DT> server.kanji.output {euc|jis|sjis}
<DD> $B%5!<%P$K=PNO$9$k4A;z%3!<%I$r;XDj$7$?$b$N$K$7$^$9!#(B
</DL>
<HR><H3> $B@_DjNc(B </H3>
<PRE>
+ server/kanji.plm
server.kanji.input: sjis,jis
server.kanji.output: sjis
</PRE>
$B%5!<%P$+$i$NF~NO$,(BSJIS$B$@$C$?$H$-$K!"$=$l$r(BJIS$B$KJQ49$7$^$9!#(B
$B$^$?%5!<%P$KBP$9$k=PNO$r(BSJIS$B$K$7$^$9!#(B
</BODY></HTML>