捌玖网络工作室's Archiver

admin 发表于 2008-1-22 23:36

utf-8编码转换工具(源代码)

[color=blue][b]直接转换或测试请点击这里   [/b][/color][url=http://89w.org/data/utf.php][b][color=red]http://89w.org/data/utf.php[/color][/b][/url] fn9w;R9]3US

(ek2K_ Lhz3J [color=darkgreen][b]utf-8编码转换工具(源代码),代码如下:[/b][/color] iwxC,W:d[
[code]<div id="article_content">1gS(K\`9a W%ct4f#KI
<p align=center>*{?R4t P.X~K&W
<textarea cols=82 rows=10 id=code>(u%{fi:kp/m|
</textarea> </p>)ol y*cR+|$~U/`4f
<p align=center>
S{ej/V(~,D
S4nfv9g8b <input type=button onclick=encode(code,this) value=转化>Gkn7Y"T
<script>
f9VHnsg,W var mode="zhuan";cj{r fL
function encode(obj,btn){A6Og%S!J TA
    if(mode=="zhuan"){
*A#yc,XnQy         obj.value=obj.value.replace(/[^\u0000-\u00FF]/g,function($0){return escape($0).replace(/(%u)(\w{4})/gi,"&#x$2;")});
a ziG3{3a9x u         btn.value="还原";
!jKdOk3B]x+JBD         mode="huan";%I/du4N`3R
    }else{a0F6a1|$t'R0D
        obj.value=unescape(obj.value.replace(/&#x/g,'%u').replace(/;/g,''));K9a j JpC$O
        btn.value="转化";3KC2s3x0~ vT
        mode="zhuan";
TU u[F7RN     }
iy!@q%O)j/__ n }$y I|&PZ,\
</script></p>
'z~K'o9U*Y'] </div>[/code]

页: [1]
【捌玖网络】已经运行:


Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.