**////*************************************//
/// <summary>
/// 26个日文片假名编码
/// </summary>
/// <param>梁远全</param>
/// <param>2006.8.10</param>
///*************************************//
using System;
using System.Text;namespace JAPCode
...{
    /**//// <summary>
    /// JAPCode 的摘要说明。
    /// </summary>
    public class JAP
    ...{
        public JAP()
        ...{}        /**//// <summary>
        /// 日文编码
        /// </summary>
        /// <param name="txt"></param>
        /// <returns></returns>
        public static string JAPEncode(string txt)
        ...{
            int[] ascLists = ...{92, 304, 305, 430, 431, 437, 438, 12460, 12461, 12462, 12463, 12464, 12465, 
                                 12466, 12467, 12468, 12469, 12470, 12471, 12472, 12473, 12474, 12475, 12476, 
                                 12477, 12478, 12479, 12480, 12481, 12482, 12483, 12485, 12486, 12487, 12488, 
                                 12489, 12490, 12496, 12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 
                                 12505, 12506, 12507, 12508, 12509, 12510, 12521, 12532, 12533, 65340};
            
            for(int i = 0;i<ascLists.Length;i++)
            ...{
                string key = ((char)ascLists[i]).ToString();
                if(txt.IndexOf(key) >= 0)
                ...{
                    txt = txt.Replace(key,"&#" + ascLists[i].ToString() + ";");
                }
            }            return txt;
        }        /**//// <summary>
        /// 日文解码
        /// </summary>
        /// <param name="txt"></param>
        /// <returns></returns>
        public static string JAPDecode(string txt)
        ...{
            int[] ascLists = ...{92, 304, 305, 430, 431, 437, 438, 12460, 12461, 12462, 12463, 12464, 12465, 
                                 12466, 12467, 12468, 12469, 12470, 12471, 12472, 12473, 12474, 12475, 12476, 
                                 12477, 12478, 12479, 12480, 12481, 12482, 12483, 12485, 12486, 12487, 12488, 
                                 12489, 12490, 12496, 12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 
                                 12505, 12506, 12507, 12508, 12509, 12510, 12521, 12532, 12533, 65340};
            
            for(int i = 0;i<ascLists.Length;i++)
            ...{
                string key = "&#" + ascLists[i].ToString() + ";";//
                if(txt.IndexOf(key) >= 0)
                ...{
                    txt = txt.Replace(key,((char)ascLists[i]).ToString());
                }
            }            return txt;
        }
    }
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/CShapBoy/archive/2006/08/12/1053934.aspxOleDbCommand command = new OleDbCommand("select * from productt where  [title] like '%" + Request.QueryString["Keywords"].ToString() + "%' order by [sortid] desc", Conn);
菜鸟问: 最近换了ACCESS帮公司做些小网站。 因为ACCESS好像跟某些日文不兼容。老是报内存溢出。         请问怎么把这个类方法,,加到SQL语句里?   title字段里都是日文的值!谢谢了!!!!!