| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 617 人关注过本帖
标题:为何我的汉字转拼音 '覃'字出错为'z'
取消只看楼主 加入收藏
jxwjlx
Rank: 1
等 级:新手上路
帖 子:236
专家分:8
注 册:2013-1-25
结帖率:97.78%
收藏
已结贴  问题点数:10 回复次数:1 
为何我的汉字转拼音 '覃'字出错为'z'
function Htop
parameters txt,i
  mystr=substr(txt,i,2)
  If Asc(mystr) > 0
    If Asc(Left(mystr,2)) < Asc("啊")
       py = Left(mystr,2)
    EndIf
    If Asc(Left(mystr, 2)) >= Asc("啊") And Asc(Left(mystr, 1)) < Asc("芭")
       py = "A"
    EndIf
    If Asc(Left(mystr, 2)) >= Asc("芭") And Asc(Left(mystr, 1)) < Asc("擦")
       py = "B"
    EndIf
    If Asc(Left(mystr, 2)) >= Asc("擦") And Asc(Left(mystr, 1)) < Asc("搭")
       py = "C"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("搭") And Asc(Left(mystr, 1)) < Asc("蛾")
       py = "D"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("蛾") And Asc(Left(mystr, 1)) < Asc("发")
       py = "E"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("发") And Asc(Left(mystr, 2)) < Asc("噶")
       py = "F"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("噶") And Asc(Left(mystr, 2)) < Asc("哈")
       py = "G"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("哈") And Asc(Left(mystr, 2)) < Asc("击")
       py = "H"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("击") And Asc(Left(mystr, 2)) < Asc("喀")
       py = "J"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("喀") And Asc(Left(mystr, 2)) < Asc("垃") Or mystr='剀'
       py = "K"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("垃") And Asc(Left(mystr, 2)) < Asc("妈")
       py = "L"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("妈") And Asc(Left(mystr, 2)) < Asc("拿")
       py = "M"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("拿") And Asc(Left(mystr, 2)) < Asc("哦")
       py = "N"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("哦") And Asc(Left(mystr, 2)) < Asc("啪")
       py = "O"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("啪") And Asc(Left(mystr, 2)) < Asc("期") or mystr='翩'
       py = "P"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("期") And Asc(Left(mystr, 2)) < Asc("然")
       py = "Q"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("然") And Asc(Left(mystr, 2)) < Asc("撒")
       py = "R"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("撒") And Asc(Left(mystr, 2)) < Asc("塌")
       py = "S"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("塌") And Asc(Left(mystr, 2)) < Asc("挖")
       py = "T"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("挖") And Asc(Left(mystr, 2)) < Asc("昔") Or mystr='炜'
       py = "W"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("昔") And Asc(Left(mystr, 2)) < Asc("压") Or mystr='馨'
       py = "X"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("压") And Asc(Left(mystr, 2)) < Asc("匝") or mystr='懿'
       py = "Y"
    Endif
    If Asc(Left(mystr, 2)) >= Asc("匝") and mystr!='馨' and mystr!='炜' and mystr!='剀' and mystr!='翩' and mystr!='懿'
       py = "Z"
    Endif
    If upper(mystr) <= "Z" And upper(mystr) >= "A"
          py=upper(mystr)
    Endif
  Endif
return py
endproc
搜索更多相关主题的帖子: function 汉字 
2014-02-01 16:30
jxwjlx
Rank: 1
等 级:新手上路
帖 子:236
专家分:8
注 册:2013-1-25
收藏
得分:0 
不错,试过了,如果是姓氏拼音码更好,这里‘覃’读的是T而不是姓氏Q?
2014-02-03 13:39
快速回复:为何我的汉字转拼音 '覃'字出错为'z'
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024148 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved