Program code <HTML>
<Head>
<Title> gb2312 Unicode Conversion Tool </title>
<Div align = center>
<Center>
<Table border = 0 cellpadding = 0 cellspacing = 0 style = "border-collapse: collapse" width = 600 id = autonumber1 Height = 26>
<Tr>
<TD width = 100% Height = 26>
<P align = center> <font face = size = 5 color = # ff0000> Unicode Conversion Tool </font> </P>
<P> usage: </P>
<P> enter Chinese text in the text box below and press "convert" to convert it to a Unicode character. </P>
<P> press "Restore" to restore it to simplified Chinese. </TD>
</Tr>
</Table>
</Center>
</Div>
<P align = center>
<Textarea Cols = 82 rows = 10 Id = code>
</Textarea> </P>
<P align = center>
<Input type = button onclick = encode (Code, this) value = conversion>
<SCRIPT>
VAR mode = "Zhuan ";
Function encode (OBJ, BTN ){
If (mode = "Zhuan "){
OBJ. value = obj. value. replace (/[^ \ u0000-\ u00ff]/g, function ($0) {return escape ($0 ). replace (/(% u) (\ W {4})/GI, "& # x $2 ;")});
BTN. value = "restored ";
Mode = "Huan ";
} Else {
OBJ. value = Unescape (obj. value. Replace (/& # x/g, '% U'). Replace (/;/g ,''));
BTN. value = "Conversion ";
Mode = "Zhuan ";
}
}
</SCRIPT> </P>