Traditional chinese to simplified conversion script preview
March 3rd, 2007 by William YangIn my previous post, I covered how I encountered a problem converting from traditional chinese to simplfieid chinese in unicode, and how I came up with a conversion script.
This is the test page for the conversion script.
Sample Code: | Download it
Show Code | Download this script
- <?
- if ($_POST['Submit']) {
- require_once('tradsimp.php');
- $s = convert_trad_to_simp($_POST['t']);
- }
- ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Convert from traditional chinese to simplified chinese in unicode</title>
- <style type="text/css">
- <!--
- .style1 {font-family: Arial, Helvetica, sans-serif}
- -->
- </style>
- </head>
- <body>
- <form id="form1" name="form1" method="post" action="">
- <label>
- <span class="style1">Traditional Chinese<br />
- <br />
- <textarea name="t" cols="40" id="t"></textarea>
- </span></label>
- <p class="style1">Simplified Chinese</p>
- <p class="style1">
- <label>
- <textarea name="s" cols="40" id="s"><?=$s; ?></textarea>
- </label>
- </p>
- <p>
- <span class="style1">
- <label>
- <input type="submit" name="Submit" value="Convert" />
- </label>
- </span> </p>
- </form>
- </body>
- </html>


Sunday, March 4th 2007 at 12:11 am
[…] Traditional chinese to simplified conversion script preview » […]
Sunday, March 4th 2007 at 1:35 am
Yes, it works, thank you for such good script.