亚洲av色香蕉一区二区三区,十四以下岁毛片带血a级,亚洲 校园 欧美 国产 另类,亚洲av日韩av一区谷露,色欲av无码一区二区三区

  • 相關(guān)軟件
    >jsp中任意文字轉(zhuǎn)Unicode的通用模塊 創(chuàng)建者:webmaster 更新時(shí)間:2005-05-18 13:20

    /** ToUnicode.java */ package com.edgewww.util; import java.io.*; /** * 字符串轉(zhuǎn)換成Unicode碼的類 * @author 欒金奎 jsp@shanghai.com * @date 2001-03-05 */ public class ToUnicode { /** * 把字符串轉(zhuǎn)換成Unicode碼 * @param strText 待轉(zhuǎn)換的字符串 * @param code 轉(zhuǎn)換前字符串的編碼,如"GBK" * @return 轉(zhuǎn)換后的Unicode碼字符串 */ public String toUnicode(String strText,String code) throws UnsupportedEncodingException{   char c;   String strRet = "" ;   int intAsc;   String strHex;   strText = new String(strText.getBytes("8859_1"),code);   for ( int i = 0; i < strText.length(); i++ ){     c = strText.charAt(i);     intAsc = (int)c;     if(intAsc>128){       strHex = Integer.toHexString(intAsc);       strRet = strRet + "&#x" + strHex+";";     }     else{       strRet = strRet + c;     }   }   return strRet ; } } /** 應(yīng)用舉例 */ /** gbk2Unicode.jsp */ <% String lang = "這是簡(jiǎn)體中文"; %>
    <%=lang %>
    <%=g2u.toUnicode(lang,"GBK") %>
    相關(guān)文章
    本頁(yè)查看次數(shù):