中文数组Sort()方法排序? 例: abc = new Arrary("沈文涉","孙准均","罗顺英","李浩政") document.write(abc.sort() + "<br/>") 孙准均/S, 李浩政/L, 沈文涉/S, 罗顺英/L //实际结果/首字生母 孙准均/S, 沈文涉/S, 罗顺英/L, 李浩政/L //正确结果/首字生母 我用的是<script language="vbscript"> function getPYChar(char) tmp=65536+asc(char) if(tmp>=45217 and tmp<=45252) then getPYChar= "a" if(tmp>=45253 and tmp<=45760) then getPYChar= "b" if(tmp>=45761 and tmp<=46317) then getPYChar= "c" if(tmp>=46318 and tmp<=46825) then getPYChar= "d" if(tmp>=46826 and tmp<=47009) then getPYChar= "e" if(tmp>=47010 and tmp<=47296) then getPYChar= "f" if(tmp>=47297 and tmp<=47613) then getPYChar= "g" if(tmp>=47614 and tmp<=48118) then getPYChar= "h" if(tmp>=48119 and tmp<=49061) then getPYChar= "j" if(tmp>=49062 and tmp<=49323) then getPYChar= "k" if(tmp>=49324 and tmp<=49895) then getPYChar= "l" if(tmp>=49896 and tmp<=50370) then getPYChar= "m" if(tmp>=50371 and tmp<=50613) then getPYChar= "n" if(tmp>=50614 and tmp<=50621) then getPYChar= "o" if(tmp>=50622 and tmp<=50905) then getPYChar= "p" if(tmp>=50906 and tmp<=51386) then getPYChar= "q" if(tmp>=51387 and tmp<=51445) then getPYChar= "r" if(tmp>=51446 and tmp<=52217) then getPYChar= "s" if(tmp>=52218 and tmp<=52697) then getPYChar= "t" if(tmp>=52698 and tmp<=52979) then getPYChar= "w" if(tmp>=52980 and tmp<=53688) then getPYChar= "x" if(tmp>=53689 and tmp<=54480) then getPYChar= "y" if(tmp>=54481 and tmp<=56289) then getPYChar= "z" end function function getpy(str) for i=1 to len(str) getpy= getpy&getPYChar(mid(str,i,1))&"" next end function </script> 转gbk码这个问题怎么解决? 能提供部分代码么
例:
abc = new Arrary("沈文涉","孙准均","罗顺英","李浩政")
document.write(abc.sort() + "<br/>")
孙准均/S, 李浩政/L, 沈文涉/S, 罗顺英/L //实际结果/首字生母
孙准均/S, 沈文涉/S, 罗顺英/L, 李浩政/L //正确结果/首字生母
我用的是<script language="vbscript">
function getPYChar(char)
tmp=65536+asc(char)
if(tmp>=45217 and tmp<=45252) then getPYChar= "a"
if(tmp>=45253 and tmp<=45760) then getPYChar= "b"
if(tmp>=45761 and tmp<=46317) then getPYChar= "c"
if(tmp>=46318 and tmp<=46825) then getPYChar= "d"
if(tmp>=46826 and tmp<=47009) then getPYChar= "e"
if(tmp>=47010 and tmp<=47296) then getPYChar= "f"
if(tmp>=47297 and tmp<=47613) then getPYChar= "g"
if(tmp>=47614 and tmp<=48118) then getPYChar= "h"
if(tmp>=48119 and tmp<=49061) then getPYChar= "j"
if(tmp>=49062 and tmp<=49323) then getPYChar= "k"
if(tmp>=49324 and tmp<=49895) then getPYChar= "l"
if(tmp>=49896 and tmp<=50370) then getPYChar= "m"
if(tmp>=50371 and tmp<=50613) then getPYChar= "n"
if(tmp>=50614 and tmp<=50621) then getPYChar= "o"
if(tmp>=50622 and tmp<=50905) then getPYChar= "p"
if(tmp>=50906 and tmp<=51386) then getPYChar= "q"
if(tmp>=51387 and tmp<=51445) then getPYChar= "r"
if(tmp>=51446 and tmp<=52217) then getPYChar= "s"
if(tmp>=52218 and tmp<=52697) then getPYChar= "t"
if(tmp>=52698 and tmp<=52979) then getPYChar= "w"
if(tmp>=52980 and tmp<=53688) then getPYChar= "x"
if(tmp>=53689 and tmp<=54480) then getPYChar= "y"
if(tmp>=54481 and tmp<=56289) then getPYChar= "z"
end function
function getpy(str)
for i=1 to len(str)
getpy= getpy&getPYChar(mid(str,i,1))&"" next
end function
</script>
转gbk码这个问题怎么解决?
能提供部分代码么
----------------------
你往前翻一页啊。前面有中文排序。
http://www.blueidea.com/bbs/archivecontent.asp?id=697036&page=1