汉字简繁转换asp函数/asp简体转繁体(简繁转换)
汉字简繁转换asp函数/asp简体转繁体(简繁转换)
<%
'====================================================================
'by surnfu 030313.org 2005.04.27
'间繁转换函数
'调用 response.write surnfujtof("我",1) 1简到繁 2繁到简
'字体集是在网上下载的,我发现有重复,通过函数处理掉400多个重复字符
' 可是还是有重复,很奇怪不知道为什么处理不完全
'下面我给出处理代码
'如果你知道怎么回事麻烦你给我email surnfu@126.com
'====================================================================
'dim l,i,surnfujian,surnfufan
'surnfujian="同下面"
'surnfufan="同下面"
'l=len(surnfujian)
'for i=1 to l Step 1
'if StrComp(mid(surnfujian,i,1),mid(surnfufan,i,1),0)=0 then
'surnfujian=mid(surnfujian,1,i-1)&mid(surnfujian,i+1)
'surnfufan=mid(surnfufan,1,i-1)&mid(surnfufan,i+1)
'end if
'next
'response.write surnfujian&"<br>"&surnfufan
'====================================================================
function surnfujtof(str,types)
dim surnfujian,surnfufan,surnfujtofstr
surnfujtofstr=""
surnfujian="皑蔼碍爱翱袄奥澳靶耙坝罢摆败扳颁办绊帮绑镑谤剥雹饱宝报鲍辈贝钡狈备惫绷笔蓖毕毙闭弊臂陛边编贬变辩辫鳖别瘪濒滨宾摈饼拨钵铂驳卜补簿怖参蚕残惭惨灿苍舱仓沧厕侧册测层诧搀掺蝉馋谗缠铲产阐颤猖场尝长偿肠厂畅钞车掣彻郴尘陈衬撑称惩诚骋痴迟驰耻齿炽冲虫宠酬畴踌筹绸丑橱厨锄雏础储搐触处传疮闯创锤纯戳绰茨雌辞瓷词赐聪葱囱从丛凑醋促蹿窜瘁淬撮措错达戴带贷担单郸掸胆但惮诞弹当挡党荡档捣岛祷导盗灯邓迪敌涤递缔颠滇点垫电奠淀钓调爹蝶迭谍叠钉顶锭订东懂动栋冻斗犊独读睹赌镀锻断缎兑队对吨敦顿钝遁哆夺鹅额讹恶遏饿儿尔饵贰发罚阀珐矾钒烦范贩饭访纺飞废费纷坟奋愤粪丰枫峰锋风疯逢冯缝讽凤肤辐抚辅赋复腹负讣妇缚噶该概钙盖干赶秆赣冈刚钢纲岗皋搞镐搁鸽疙阁铬个给羹耿龚宫巩贡钩沟构购够蛊顾剐关观馆惯贯广规硅归龟闺轨诡柜贵刽辊滚锅国过骸骇韩汉阂赫鹤贺横轰鸿红后壶护沪户哗华画划话徊怀坏欢环还缓换唤痪焕涣黄蝗谎挥辉恢毁慧晦贿秽会烩汇讳诲绘荤浑伙获货祸击机稽积饥讥鸡绩缉极辑级挤几蓟剂济计记际继纪夹荚颊贾钾稼价驾歼监坚笺间艰缄茧检碱硷拣捡简俭减荐槛鉴践贱见键舰剑饯渐溅涧浆蒋桨奖讲酱椒焦胶浇骄娇搅铰矫侥脚饺缴绞教轿较揭秸阶节茎惊经景颈静敬镜径痉竟竞净纠厩旧驹举据锯惧剧鹃绢攫杰睫洁结藉诫届紧锦仅谨进晋烬尽劲荆觉决诀绝钧军俊浚骏开凯堪坎康糠颗壳课垦恳抠库裤夸块侩宽矿旷况亏岿窥奎傀馈溃扩阔蜡腊莱来赖蓝栏拦篮阑兰澜谰揽览懒缆烂滥捞劳涝乐镭垒肋类泪冷梨黎篱离理里鲤礼荔丽厉励砾历痢沥隶哩俩联莲连镰怜涟帘敛脸链恋炼练粮凉两辆谅聊疗寥辽撂镣猎临邻鳞凛赁菱龄铃凌灵岭领馏刘龙聋咙笼隆垄拢陇楼娄搂篓陋芦卢颅庐炉掳卤虏鲁赂禄录陆驴吕铝侣履屡缕虑滤绿峦挛孪滦乱抡轮伦仑沦纶论萝罗逻锣箩骡落骆络妈玛码蚂马骂吗买麦卖迈脉瞒馒蛮满谩猫锚铆贸么霉没镁门闷们蒙盟锰梦谜弥觅绵勉缅藐庙灭悯闽鸣铭谬摹谋亩钠纳难挠脑恼闹呢馁腻蔫撵捻酿鸟聂啮镊镍柠狞宁拧泞钮纽脓浓农疟懦诺欧鸥殴呕沤潘盘盼庞国山爱下赔喷鹏骗飘频贫苹凭评坡泼颇扑铺朴谱脐齐骑岂启砌气弃讫牵扦钎铅迁签谦黔钱钳潜浅谴堑歉枪呛羌墙蔷强抢锹桥乔侨撬翘窍窃钦亲轻氢倾顷请庆琼穷趋区躯驱取龋颧权痊劝炔却鹊让饶扰绕热韧认纫荣绒褥软锐闰润撒洒萨鳃赛伞嗓丧骚扫涩杀纱啥筛晒闪陕赡缮伤赏捎烧绍赊赦摄慑设绅审婶肾渗声绳胜圣师狮湿诗尸时蚀实识驶势释饰视试寿兽枢输书赎熟暑署黍属术树竖数帅双谁税瞬顺说硕烁丝饲耸怂颂讼诵艘擞苏诉肃蒜虽绥碎岁孙损笋梭缩琐锁獭挞抬酞摊贪瘫滩坛痰谭谈袒探叹汤烫涛绦腾誊锑题啼体嚏涕屉条贴铁厅听烃铜统头图涂团颓蜕退拖脱鸵驮驼椭洼袜弯湾顽万网韦违围惟为潍维苇伟伪纬谓卫温闻纹稳问翁瓮挝蜗涡窝握呜钨乌诬无芜吴坞雾务误锡牺膝檄袭习铣戏细虾辖峡侠狭厦锨鲜纤咸贤衔闲显险现献县馅羡宪限线厢镶乡详响项萧销晓啸些蝎协挟携胁谐写卸懈泻谢锌衅兴汹锈绣戌虚嘘须许绪续轩悬选癣绚薛学勋询寻驯训讯逊压鸦鸭哑亚讶咽阉烟盐严颜阎艳厌砚唁彦谚验鸯杨扬疡阳痒养样邀瑶摇尧遥窑谣药噎爷页业叶夜壹医铱颐遗仪彝蚁艺亿逸疫毅忆义诣议谊译异翌绎荫阴银饮樱婴鹰应缨莹萤营荧蝇颖哟拥佣痈雍踊咏涌优忧邮铀犹游诱盂愚舆鱼渝渔娱与屿语吁御狱誉预驭鸳渊辕园员圆源缘远愿院约跃钥岳粤悦阅云郧匀陨运蕴酝晕韵杂灾载攒暂赞赃脏遭凿枣灶责择则泽贼赠扎札轧铡闸诈斋债瞻毡盏斩辗崭蘸栈战湛绽张涨帐账胀赵蛰辙锗这甄臻贞针侦诊振镇阵挣睁狰帧郑证织职殖执纸挚掷帜质钟终种肿众诌轴皱昼骤猪诸诛烛瞩嘱贮铸筑驻专砖转赚桩庄装妆壮状锥赘坠缀谆浊兹资渍棕踪综总纵邹诅组钻致钟么为只凶准启板里雳余链泄"
surnfufan="褒汤邓?勐O??W澳靶耙?瘟T?[?“忸C揠较?徒?孓烛??雹?????篚U????滢?N???v??剐蓖???篱]弊臂陛????偃??揆摒???e霸?l?I馘?P???芾?闼耒饰厌簿怖?⑿Q???M?K?N深???}?????????y?釉??v?较s????鲤缧?b暾??猖???L樘??你?S?斥n??掣?爻??m??因?畏Q?驼蚯爸唪褓?u?X???_哮??酬??苄簧旧徼???N潸腧盗?Υび|???鳢?晔??逦??戳锯茨雌揎瓷轧兕??售????????醋促苕岗瘁淬撮措邋哌戴?зJ???梧??勰?但??昭?????觞h???n?v?u??ПI?羿?迪???爝f????滇?c?|??奠?蔗?整爹蝶叠???B????逯???|懂?????鲷Y?侏?坐睹???????嗑??蛾?????敦钅忡遁哆?Z?Z铪???憾麴I????鹉倥办列轾?m碘C?┕?????蕴??秣?U偻?????^??加赜?鞣邃h锾??逢裨筐钟?P镊???彷o嬴妖腹?????D苦噶??概恺慎?众s??谕??????局??胖搞???R??疙轺泗??斤羹耿???m????忤???????蛐M????晷愚疝?T???V??矽?w??辄??????倨?]??L????咿骸??眍?h轷赫?Q僖?M挹??剪後?刈o?????W攘??????徊?????g?h?????Q?警????o?S蝗皱?]蔌恢?Щ刍拶V辐???Z?≈M珍捞????夥?@???????C稽峰??咨膈?????O?????D?姿E????????肴擂硷?A泅钺仝??稼?r覃??毕?怨{殓颇君老?z?A?|???旌????p溯??桠坂裒??嫔????鹪?u?R???{寿????嘱狨椒焦您?豺?????泷趁?e倪??勒界教奚蒉揭吠肓??秋罄??景铋祜敬缫?蒋d竟???Q柬??沛聒佩???????※N??攫?芙???劫藉蛰?镁o??H??咄?x?a蓖?徘G迂?Q耘睫怿??俊浚蚺檫?P堪坎康糠铟?ふn???????煅?掌?K?~??抵???r???h秆奎傀?????U????拍纫?碣?他???r焕昀添??????盂?欣|???E???????疯D?纠哳??I冷梨黎昏滕理奄??顿荔?????畹[?蚜??r豚哩?z????呗???z?i???磕?????????稼???奢v??聊??寥唿撂???C乓??髹?C僬菱?g???R爨?X钌痼????美?祷隆???n胼?????Шt陋淌币锫?]?t?稃u????僭??????笕?武X?H履?铱|?]?V厩?n??????y?噍??????S据??听吝????魂??落??疥????瘁??褚烈?豳I??脔唼谬岔瘊姓?M????遛阍傺麽?q?]嬷樵????蒙盟彘?糁i????句勉??藐?R????辇?Q????摹之?忏见膣?夏X?吏[呢鹑??蔫?f?俞??B???m????????甯?Q?翕o件???廪r??懦众?W?t???I?a潘毙盼????山?巯沦r???i蜻镨铎??滔?{怎坡??钊?滗??阕V???R蛟赝??砌?????????L庠阏喵??拄黔遑阊???嘴?q歉???芮???宋????胬?????S撬挛港膏?J尤蒺???A?????c??钙???^茳??取?x锱?嗳??袢??s?o?????_览?犴g帐鉴?s今褥??涫殂??撒?⑺_鲼???闵??黍}?????⒓?啥嘿?耖W????????兖捎??铰黉赦?z?卦O?????鹉I?B??浪?俾}???{?裨????r午??滓???葆????????郢F?休???谌熟暑署黍?傩g?湄Q????腽侦??瞬??真丛?q晋?????Z??粤这艘?趟灾妹蒜腠??碎?q?O?p褂梭矿??骈?H???E酞????般????痰自??袒探?U???C??快蝣粥湟铨啼篦嚏涕???l傥杵?d???N泾靳钷?D?T?F铌??退拖???r褡???E改翼???愁B孺咀礞哙??惟???H居?????^??洲徐?芈?践????翁?Y?胛??u该握?桄u?跽_?o?????]炱?照`遽?尴ハ?阴?????蚣?悟???{?b?M?B弼躜厉?y亵??殄锢胝?F?I胯鹱流??限??????囔????????湮???[些???f???y名置??卸懈?a著溽?配?扮n烂戌???u??杂诀理???疫x斑诫薛?W?煸??ゑZ????咪?壶f????????咽?????}?李???刈????唁?┲V???????P????白鹇?友????u?蜻b盖蛀??噎?????I叁夜壹狒??钫啁?x?は????|逸疫毅??柳??阻狰诅??翌累梳??泫?????膪???吏?????I?上?锋?????虬b雍埒???????n噍???q咣赵盂愚??酤渝?O?逝c?Z遮活兑?z柞盍裼?x?Y蘩?@?T?A源??哞??院俭苡???[????????帙?螂E咛N彡????塍?妮d???嘿?谂篥遭????皋?????t?少??????????殪责?S??瞻?直K?剌??湔????鹫烤`???q?べ~??邝险奕嫖呃甄臻?????稍振?????瓯??b????酌????殖?碳????S?觅|嬉剿肺嫩兄a萦????笈亻衷漳?T???谫A柙郝聆?4u弈???肚f砚?y???铄F????举???崞?儋?n棕??久??况圊喳酵??坷???N?殡b?????㈤?彦熠鹞????"
if types=1 then '简到烦
surnfujtofstr=surnfujof(str,surnfujian,surnfufan)
elseif types=2 then '简到烦
surnfujtofstr=surnfujof(str,surnfufan,surnfujian)
end if
surnfujtof=surnfujtofstr
end function
function surnfujof(str,str1,str2)
dim surnfufori,finlishstr,surnfulens
surnfulens=len(str)
finlishstr=""
for surnfufori=1 to surnfulens
if instr(str1,mid(str,surnfufori,1))<>0 then
finlishstr=finlishstr&mid(str2,instr(str1,mid(str,surnfufori,1)),1)
else
finlishstr=finlishstr&mid(str,surnfufori,1)
end if
next
surnfujof=finlishstr
end function
%>