HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/cmykDe/ut8b5.php

<textarea cols="20" rows="5" id="str">

</textarea><p/>

<input type="button" value="�ഫ" onclick="javascript: encode(str,this);" />



<script> 

var charset="big5";

function encode(content,btn){ 

   if(charset=="big5"){ 

       content.value=content.value.replace(/[^\u0000-\u00FF]/g,function($0){return escape($0).replace(/(%u)(\w{4})/g,"&#x$2;")});         

       btn.value="�٭�";       

       charset="utf8";

   }else{     

       content.value=unescape(content.value.replace(/&#x/g,'%u').replace(/;/g,''));         

       btn.value="�ഫ";      

       charset="big5";

   }

}

</script>