home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
plum2_33_1.lzh
/
module
/
server
/
kanji.plm
< prev
next >
Wrap
Text File
|
1999-03-24
|
2KB
|
89 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- $_ if 0; # -*- perl -*-
# $Id: kanji.plm,v 2.5 1998/12/20 02:27:44 hasegawa Exp $
# copyright (c)1997-1998 Yoshinori Hasegawa <hasegawa@madoka.org>
package server_kanji;
$_ = 'server_kanji';
sub server_read {
local($serverno, $line) = @_;
foreach $kanji (&'property($'userno[$serverno], 'input')) {
foreach $code (split(/\,/, "\L$kanji\E")) {
if ($code eq 'euc') {
$line = &'euc_jis($line);
} elsif ($code eq 'jis') {
$line = &'jis_jis($line);
} elsif ($code eq 'sjis') {
$line = &'sjis_jis($line);
}
}
}
return $line;
}
sub server_write {
local($serverno, $line) = @_;
local($kanji, $code);
$kanji = &'property($'userno[$serverno], 'output');
if ($kanji) {
$code = (split(/\,/, "\L$kanji\E"))[0];
if ($kanji eq 'euc') {
$line = &'jis_euc($line);
} elsif ($kanji eq 'jis') {
$line = &'jis_jis($line);
} elsif ($kanji eq 'sjis') {
$line = &'jis_sjis($line);
}
}
return $line;
}
__END__
--><HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-2022-JP">
<LINK REV="made" HREF="mailto:hasegawa@madoka.org">
<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* ({jis|euc|sjis})
</DT>
<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
</DD>
<DT> server.kanji.output {jis|euc|sjis}
</DT>
<DD> $B%5!<%P$K=PNO$9$k4A;z%3!<%I$r;XDj$7$?$b$N$K$7$^$9!#(B
</DD>
</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>