jsp,java±àÂëÔÀí
Îļþ´ò¿ªÊ±ºòÊÇͨ¹ýÎļþÍ·À´È·¶¨ÎļþµÄ±àÂë
StreamReader sr=new StreamReader(@"F:\cym\temp\1.txt");
sr.CurrentEncoding //·µ»Ø±àÂë
ÊÀ½çÉϵĸ÷µØÇø¶¼Óб¾µØµÄÓïÑÔ¡£µØÇø²îÒìÖ±½Óµ¼ÖÂÁËÓïÑÔ»·¾³µÄ²îÒì¡£ÔÚ¿ª·¢Ò»¸ö¹ú¼Ê»¯³ÌÐòµÄ¹ý³ÌÖУ¬´¦ÀíÓïÑÔÎÊÌâ¾ÍÏԵúÜÖØÒªÁË¡£
¡¡¡¡ÕâÊÇÒ»¸öÊÀ½ç·¶Î§ÄÚ¶¼´æÔÚµÄÎÊÌ⣬ËùÒÔ£¬Java
ÌṩÁËÊÀ½çÐԵĽâ¾ö·½·¨¡£±¾ÎÄÃèÊöµÄ·½·¨ÊÇÓÃÓÚ´¦ÀíÖÐÎĵģ¬µ«ÊÇ£¬Íƶø¹ãÖ®£¬¶ÔÓÚ´¦ÀíÊÀ½çÉÏÆäËü¹ú¼ÒºÍµØÇøµÄÓïÑÔͬÑùÊÊÓá£
¡¡¡¡ºº×ÖÊÇË«×ֽڵġ£Ëùν˫×Ö½ÚÊÇÖ¸Ò»¸öË«×ÖÒªÕ¼ÓÃÁ½¸öBYTEµÄλÖ㨼´16룩£¬·Ö±ð³ÆΪ¸ßλºÍµÍλ¡£Öйú¹æ¶¨µÄºº×Ö±àÂëΪGB2312£¬Õâ
ÊÇÇ¿ÖÆÐԵģ¬Ä¿Ç°¼¸ºõËùÓеÄÄÜ´¦ÀíÖÐÎĵÄÓ¦ÓóÌÐò¶¼Ö§³ÖGB2312¡£GB2312°üÀ¨ÁËÒ»¶þ¼¶ºº×ÖºÍ9Çø·ûºÅ£¬¸ßλ´Ó0xa1µ½0xfe£¬µÍλҲÊÇ´Ó
0xa1µ½0xfe£¬ÆäÖУ¬ºº×ֵıàÂ뷶ΧΪ0xb0a1µ½0xf7fe¡£
¡¡¡¡ÁíÍâÓÐÒ»ÖÖ±àÂ룬½Ð×öGBK£¬µ«ÕâÊÇÒ»·Ý¹æ·¶£¬²»ÊÇÇ¿ÖƵġ£GBKÌṩÁË20902¸öºº×Ö£¬Ëü¼æÈÝGB2312£¬±àÂ뷶ΧΪ0x8140µ½0xfefe¡£GBKÖеÄËùÓÐ×Ö·û¶¼¿ÉÒÔÒ»Ò»Ó³Éäµ½Unicode 2.0¡£
¡¡¡¡ÔÚ²»¾ÃµÄ½«À´£¬Öйú»á°ä²¼ÁíÒ»ÖÖ±ê×¼£ºGB18030-2000£¨GBK2K£©¡£ËüÊÕ¼Á˲ء¢ÃɵÈÉÙÊýÃñ×åµÄ×ÖÐÍ£¬´Ó¸ù±¾ÉϽâ¾öÁË×Öλ²»×ãµÄ
ÎÊÌâ¡£×¢Ò⣺Ëü²»ÔÙÊǶ¨³¤µÄ¡£Æä¶þ×Ö½Ú²¿·ÝÓëGBK¼æÈÝ£¬ËÄ×Ö½Ú²¿·ÖÊÇÀ©³äµÄ×Ö·û¡¢×ÖÐΡ£ËüµÄÊ××ֽں͵ÚÈý×Ö½Ú´Ó0x81µ½0xfe£¬¶þ×ֽں͵ÚËÄ×Ö½Ú´Ó
0x30µ½0x39¡£
¡¡¡¡±¾ÎIJ»´òËã½éÉÜUnicode£¬ÓÐÐËȤµÄ¿ÉÒÔä¯ÀÀ“http://www.unicode.org/”²é¿´¸ü¶àµÄÐÅÏ¢¡£UnicodeÓÐÒ»¸öÌØÐÔ£ºËü°üÀ¨ÁËÊÀ½çÉÏËùÓеÄ×Ö·û×ÖÐΡ£ËùÒÔ£¬¸÷¸öµØÇøµÄÓïÑÔ¶¼¿ÉÒÔ½¨Á¢ÓëUnicodeµÄÓ³Éä¹Øϵ£¬¶øJava
ÕýÊÇÀûÓÃÁËÕâÒ»µãÒÔ´ïµ½ÒìÖÖÓïÑÔÖ®¼äµÄת»»¡£
¡¡¡¡ÔÚJDKÖУ¬ÓëÖÐÎÄÏà¹ØµÄ±àÂëÓУº
¡¡¡¡±í1¡¡JDKÖÐÓëÖÐÎÄÏà¹ØµÄ±àÂëÁбí
±àÂëÃû³Æ ˵Ã÷
ASCII 7룬Óëascii7Ïàͬ
ISO8859-1 8-룬Óë 8859_1,ISO-8859-1,ISO_8859-1,latin1...µÈÏàͬ
GB2312-80 16룬Óëgb2312,gb2312-1980,EUC_CN,euccn,1381,Cp1381, 1383, Cp1383, ISO2022CN,ISO2022CN_GB...µÈÏàͬ
GBK ÓëMS936Ïàͬ£¬×¢Ò⣺Çø·Ö´óСд
UTF8 ÓëUTF-8Ïàͬ
GB18030 Óëcp1392¡¢1392Ïàͬ£¬Ä¿Ç°Ö§³ÖµÄJDKºÜÉÙ
¡¡¡¡ÔÚʵ¼Ê±à³Ìʱ£¬½Ó´¥µÃ±È½Ï¶àµÄÊÇGB2312£¨GBK£©ºÍISO8859-1¡£
¡¡¡¡ÎªÊ²Ã´»áÓГ?”ºÅ
¡¡¡¡ÉÏÎÄ˵¹ý£¬ÒìÖÖÓïÑÔÖ®¼äµÄת»»ÊÇͨ¹ýUni
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
1.Ï̴߳´½¨µÄÁ½ÖÖ·½Ê½
1£©À©Õ¹ThreadÀಢÖØдpublic void run()·½·¨
ps£º
¶¨ÒåỊ̈߳º
class myThread extends Thread(){
public void run(){
System.out.println("Ju ......
ÔÚJavaÓïÑÔÖУ¬Ò»°ã²»ÐèÒª×Ô¶¨Òåequals()ºÍhashCode()ÕâÁ½¸ö·½·¨£¬µ±ÐèÒª¶Ô¶ÔÏóµÄÄÚÈݽøÐбȽϵÄʱºò£¬²ÅÐèÒªÕâÑùÁ½¸ö·½·¨¡£ÀýÈ磬ÐèÒª°Ñ¶ÔÏó·ÅÈëHashSet»òÕ߰ѶÔÏó×÷Ϊkey·ÅÈëHashMap¡¢ Hashtableʱ£¬Èç¹û²»Ïë°Ñ¾ßÓÐÏàͬÄÚÈݵÄÁ½¸ö¶ÔÏó×÷ΪÁ½¸ö¶ÔÏóÀ´¿´´ý£¬¾ÍÐèÒªÖض¨ÒåÕâÁ½¸ö·½·¨¡£ÕâÁ½¸ö·½·¨µÄʹÓÃÊÇ ......
a.jspÒ³ÃæÄÚÈÝ£º
%26lt;%@ page language£½"java" import£½"java.util." pageEncoding£½"GB2312"%%26gt;%26lt;form action£½"b.jsp"%26gt; name£º%26lt;input type£½text name£½name%26gt; %26lt;input type£½submit%26gt;%26lt;/form%26gt;
b.jspÒ³ÃæÄÚÈÝ£º
%26lt;%@ page language£½"java" import£½"java.util." pageE ......
°´Õսű¾ÓïÑÔÊÇ·þÎñÓÚijһ¸ö×ÓϵͳµÄÓïÑÔÕâÖÖÂÛÊö£¬ JSPÓ¦µ±±»¿´×÷ÊÇÒ»Öֽű¾ÓïÑÔ£¬È»¶ø£¬×÷ΪһÖֽű¾ÓïÑÔ£¬ JSPÓÖÏԵùýÓÚÇ¿´óÁË£¬ÔÚJSPÖм¸ºõ¿ÉÒÔʹÓÃÈ«²¿µÄJavaÀà¡£
×÷ΪһÖÖ»ùÓÚÎı¾µÄ¡¢ÒÔÏÔʾΪÖÐÐĵĿª·¢¼¼Êõ£¬JSPÌṩÁËJava Servlet µÄËùÓкô¦£¬²¢ÇÒ£¬µ±ÓëÒ»¸öJavaBeans Àà½áºÏÔÚÒ»Æðʱ£¬ÌṩÁËÒ»ÖÖʹÄÚÈ ......