<!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" />
<?php 
	// 中文预处理：英文标点 换中文，标点后去空格，替换特殊符号, " ' : 可能有问题
	session_start(); 
	require_once('inc/conn.php');
	require_once('inc/constant.php');
	require_once('inc/ls_syscode.php');
	require_once('inc/check.php');
	require('inc/conn_var.php');
	$ls_msg="";
	
	$opendb=new mydb();
	require_once('inc/char_set.php');
 
	$punctuation = array(
	',' => "，",
	'...' => "。。。",   
	'.' => "。",
	';' => "；",    
	':' => "：",    
	')' => "）",    
	'?' => "？",    
	'!' => "！",   
	);         
	$content="A bonus of up to 5 per  , cent can:   be added? to;a student' s final! exam (mark) as a:reward for good spelling .   punctuation and grammar。";
	
	foreach($punctuation as $value => $key){
		$content = str_replace($value, $key, $content);
		$content=str_replace( $key."    ",$key,$content); // 标点3空格
		$content=str_replace( $key."   ",$key,$content); // 标点3空格
		$content=str_replace( $key."  ",$key,$content); // 标点2空格
		$content=str_replace( $key." ",$key,$content); // 标点1空格
		$content=str_replace( "   ".$key,$key,$content); // 标点3空格
		$content=str_replace( "  ".$key,$key,$content); // 标点2空格
		$content=str_replace( " ".$key,$key,$content); // 标点1空格
	}
	$content=str_replace("'", "‘", $content); // 单引号
	$content=str_replace("‘  ","‘",$content); // 换回
	$content=str_replace("‘ ","‘",$content); // 换回

	$content=str_replace("(", "（", $content); // 单引号
	$content=str_replace("   （","（",$content); // 换回
	$content=str_replace("  （","（",$content); // 换回
	$content=str_replace(" （","（",$content); // 换回
	$content=str_replace("（","（",$content); // 换回

	$content=str_replace("¿" ,"",$content); 
	//echo $content;

	 

echo $content;
 	


?>
<title>无标题文档</title>
</head>

<body>
</body>
</html>