javaÖÐÎÄÂÒÂë½â¾ö×ܽá
Ϊʲô˵ÂÒÂëÊÇÖйú³ÌÐòÔ±ÎÞ·¨±ÜÃâµÄ»°ÌâÄØ£¿Õâ¸öÊ×ÏÈÒª´Ó±àÂë»úÖÆÉÏ˵Æ𣬴ó¼Ò¶¼ÊÇÖÐÎĺÍÓ¢ÎĵıàÂë¸ñʽ²»ÊÇÒ»Ñù£¬½âÂëÒ²ÊDz»Ò»ÑùµÄ£¡Èç¹ûÖйúµÄ³ÌÐòÔ±²»»áÓöµ½ÂÒÂ룬ÄÇôֻÓÐʹÓúºÓï±à³Ì¡£ººÓï±à³ÌÊÇÔõô»ØÊÂÎÒÒ²²»´óÇå³þ£¬Ó¦¸ÃÊÇÇ°Äê°É£¬ÎÒÒ»ÅóÓѸøÎÒ½éÉܺºÓï±à³Ì£¬Ôõô²»´í²»´í£¿µ±Ê±ÒòΪѧϰæûȥ¹Ø×¢Õâ¸ö£¬µÈÎÒÏÐÁË£¬ÄǸöÅóÓѲ»ÅªÕâ¸ö£¬ÎÊËûËûÒ²²»Ëµ²»´óÇå³þ£¬×îºó×Ô¼º¶ÔÕâ¸öѧϰҲ²»ÁËÁËÖ®ÁË¡£
½ñÌìÎÒдÕâ¸ö²»Êǽ²½âÖÐÓ¢ÎÄÖ®¼äµÄ²î¾à£¬½âÂëµÈ£¬ÎÒÊǽ«ÎÒÔÚÕ⼸Ä깤×÷Óöµ½¸÷ÖÖ¸÷ÑùµÄÂÒÂëµÄ½â¾ö·½·¨£¬×ܽáÒ»Ñù£¬Ò²Ï£Íû´ó¼ÒÄÜ°Ñ×Ô¼ºÔε¹½â¾öÂÒÂëµÄ·½·¨¶¼Ëµ³öÀ´£¬ÔÛÃÇŪһ¸ö½â¾öÂÒÂëµÄ“¿û»¨±¦µä”¡£
¶ÔÓÚJavaÓÉÓÚĬÈϵıàÂ뷽ʽÊÇ UNICODE,ËùÒÔÓÃÖÐÎÄÒ²Ò׳öÎÊÌâ,³£¼ûµÄ½â¾öÊÇ
String s2 = new String(s1.getBytes(“ISO-8859-1”),”GBK”);
1¡¢utf8½â¾öJSPÖÐÎÄÂÒÂëÎÊÌâ
Ò»°ã˵À´ÔÚÿ¸öÒ³ÃæµÄ¿ªÊ¼´¦£¬¼ÓÈ룺
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
%>
charset=UTF-8 µÄ×÷ÓÃÊÇÖ¸¶¨JSPÏò¿Í»§¶ËÊä³öµÄ±àÂ뷽ʽΪ“UTF-8”
pageEncoding="UTF-8" ΪÁËÈÃJSPÒýÇæÄÜÕýÈ·µØ½âÂ뺬ÓÐÖÐÎÄ×Ö·ûµÄJSPÒ³Ã棬ÕâÔÚLINUXÖкÜÓÐЧ
request.setCharacterEncoding("UTF-8"); ÊǶÔÇëÇó½øÐÐÁËÖÐÎıàÂë
ÓÐʱ£¬ÕâÑùÈÔ²»Äܽâ¾öÎÊÌ⣬»¹ÐèÒªÕâÑù´¦Àíһϣº
String msg = request.getParameter("message");
String str=new String(msg.getBytes("ISO-8859-1"),"UTF-8");
out.println(st);
2¡¢Tomcat 5.5 ÖÐÎÄÂÒÂë
)Ö»Òª°Ñ%TOMCAT°²×°Ä¿Â¼%/ webapps\servlets-examples\WEB-INF\classes\filters\SetCharacterEncodingFilter.classÎļþ¿½µ½ÄãµÄwebappĿ¼/filtersÏ£¬Èç¹ûûÓÐfiltersĿ¼£¬¾Í´´½¨Ò»¸ö¡£
2)ÔÚÄãµÄweb.xmlÀï¼ÓÈëÈçϼ¸ÐУº <filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
À´Ô´£ºhttp://hi.baidu.com/wangking/blog/item/4d28730945364aaa2eddd4a9.html
Ò»¡¢Ê²Ã´ÊÇ
JavaÊÂÎñ
ͨ³£µÄ¹ÛÄîÈÏΪ£¬ÊÂÎñ½öÓëÊý¾Ý¿âÏà¹Ø¡£
ÊÂÎñ±ØÐë·þ´ÓISO/IECËùÖƶ¨µÄACIDÔÔò¡£ACIDÊÇÔ×ÓÐÔ£¨atomicity£©¡¢Ò»ÖÂÐÔ£¨consistency£©¡¢¸ôÀëÐÔ
£¨isolation£©ºÍ³Ö¾ÃÐÔ£¨durability£©µÄËõд¡£ÊÂÎñµÄÔ×ÓÐÔ±íʾÊÂÎñ ......
ÎÄÕ³ö´¦£º http://java.chinaitlab.com/base/807715.html
Java¶ÔÏóÐòÁл¯ÊÇJDK1.1ÖÐÒýÈëµÄÒ»×鿪´´ÐÔÌØÐÔÖ®Ò»£¬Ö®Ç°51CTOÒ²Ôø½éÉܹýJavaÐòÁл¯µÄ»úÖƺÍÔÀí£¬ÕâÀïÎÒÃǽ«Ê¹ÓÃPersonÀ´·¢ÏÖÄú¿ÉÄܲ»ÖªµÀµÄ¹ØÓÚJava¶ÔÏóÐòÁл¯µÄ5¼þÊ¡£
¡¡¡¡Êµ¼ÊÉÏ£¬ÐòÁл¯µÄ˼ÏëÊÇ“¶³½á”¶ÔÏó״̬£¬´«Êä¶ÔÏó״̬£¨Ð´µ½´ÅÅÌ¡¢Í¨¹ý ......
1. javaÓëƽ̨Î޹ء£Ô´´úÂëÓɱàÒëÆ÷±àÒëΪ×Ö½ÚÂ루JVM¿ÉÖ´ÐдúÂ룩£»½âÊÍÆ÷ÔËÐÐJVM×Ö½ÚÂ루·ÒëΪ»úÆ÷Â룩¼´¿ÉµÃµ½Êä³ö½á¹û¡£
×Ö½ÚÂë¿ÉÔÚ¶à¸öƽ̨ÔËÐУ¬²»ÐèÒªÖØбàÒë¡£
c±àÒëÆ÷ÔÚ±àÒëʱÉú³ÉµÄ´úÂëÊÇÕë¶ÔÌض¨µÄÓ²¼þƽ̨²úÉúµÄ¡£
2. java¿ª·¢¹¤¾ßJDK¡£°²×°JDKʱ×Ô´øjre£¬¾ÍÊÇjavaÐéÄâ»ú¡£
jdkÊÇJava¿ª·¢¹¤¾ß°ü£¬°üº¬Á˸ ......
ÔٴδÓÍøÉϲéѯ£¬Ëѵ½ÁËRXTXcomm.jar°ü±È½ÏºÃ£¬ÊÇ·â×°ÁËcomm.jarµÄ·½·¨¡£
°²×°£º
1.copy rxtxSerial.dll to [JDK-directory]\jre\bin\rxtxSerial.dll
2.copy RXTXcomm.jar to [JDK-directory]\jre\lib\ext\RXTXcomm.jar
&nbs ......