Alt+F11,然后插入-模块: 复制下面代码到编辑窗口: Sub 半角标点符号转换为全角标点符号() '中英互译文档中将中文段落中的英文标点符号替换为中文标点符号 Dim i As Paragraph, ChineseInterpunction() As Variant, EnglishInterpunction() As Variant Dim MyRange As Range, N As Byte '定义一个中文标点的数组对象 ChineseInterpunction = Array(".…
///全角空格为12288,半角空格为32 ///其他字符半角(33-126)与全角(65281-65374)的对应关系是:均相差65248 //半角转换为全角函数 function ToDBC(txtstring) { var tmp = ""; for (var i = 0; i < txtstring.length; i++) { if (txtstring.charCodeAt(i) == 32) { …
#全角转半角 #ljl use Encode; sub CheckSBC { my ($name)=@_; my @character; my $tmpname=$name; my $headname; my $k=0; for($ii=1; $ii <= length($name); $ii++) { if(length($tmpname)>0) { my $headname2=substr($tmpname,0,1); if (ord($headname2) >= 128) { $h…