Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVAÖÐ×î·½±ãµÄUnicodeת»»·½·¨

ÔÚÃüÁîÐнçÃæÓÃnative2ascii¹¤¾ß  
1.½«ºº×ÖתΪUnicode:  
C:\Program   Files\Java\jdk1.5.0_04\bin>native2ascii  
²âÊÔ  
\u6d4b\u8bd5  
2.½«Unicodeת»»Îªºº×Ö: 
C:\Program   Files\Java\jdk1.5.0_04\bin>native2ascii   -reverse 
\u6d4b\u8bd5 
²âÊÔ
 
java ×Ô´øµÄÒ»¸önative2ascii.exeÊÇÒ»¸öºÜºÃµÄתÂ빤¾ß£¬ÔÚbinĿ¼Ï¡£Èç¹ûÄãµÄpropertiesÖÐÓкº×Ö£¬ÐèҪת³Éunicode . Ôò°Ñº¬Óкº×ÖµÄproperties¿½±´µ½bin Ŀ¼Ï£¬ È»ºóÔÚcmdÀïÃæ½øÈëbinĿ¼£¬ÊäÈ룺native2ascii -encoding  utf-8  Language-ext_zh_CN.properties.native Language-ext_zh_CN.properties¾ÍokÁË¡£Language-ext_zh_CN.propertiesÊÇתÂëºóµÄÎļþ¡£
 
ÔÚ×öJava¿ª·¢µÄʱºò£¬³£³£»á³öÏÖһЩÂÒÂ룬»òÕßÎÞ·¨Õýȷʶ±ð»ò¶ÁÈ¡µÄÎļþ£¬±ÈÈç³£¼ûµÄvalidatorÑé Ö¤ÓõÄÏûÏ¢×ÊÔ´£¨properties£©Îļþ¾ÍÐèÒª½øÐÐUnicodeÖØбàÂë¡£Ô­ÒòÊÇjavaĬÈϵıàÂ뷽ʽΪUnicode£¬¶øÎÒÃǵļÆËã»úϵͳ±àÂë ³£³£ÊÇGBKµÈ±àÂë¡£ÐèÒª½«ÏµÍ³µÄ±àÂëת»»ÎªjavaÕýȷʶ±ðµÄ±àÂëÎÊÌâ¾Í½â¾öÁË¡£
1¡¢native2ascii¼ò½é£ºnative2ascii ÊÇsun java sdkÌṩµÄÒ»¸ö¹¤¾ß¡£ÓÃÀ´½«±ðµÄÎı¾ÀàÎļþ£¨±ÈÈç*.txt,*.ini,*.properties,*.javaµÈµÈ£©±àÂëתΪUnicode±àÂë¡£ ΪʲôҪ½øÐÐתÂ룬ԭÒòÔÚÓÚ³ÌÐòµÄ¹ú¼Ê»¯¡£Unicode±àÂëµÄ¶¨Ò壺Unicode£¨Í³Ò»Âë¡¢Íò¹úÂë¡¢µ¥Ò»Â룩ÊÇÒ»ÖÖÔÚ¼ÆËã»úÉÏʹÓõÄ×Ö·û±àÂë¡£ËüΪÿ ÖÖÓïÑÔÖеÄÿ¸ö×Ö·ûÉ趨ÁËͳһ²¢ÇÒΨһµÄ¶þ½øÖƱàÂ룬ÒÔÂú×ã¿çÓïÑÔ¡¢¿çƽ̨½øÐÐÎı¾×ª»»¡¢´¦ÀíµÄÒªÇó¡£1990Ä꿪ʼÑз¢£¬1994ÄêÕýʽ¹«²¼¡£Ëæ׿ÆËã »ú¹¤×÷ÄÜÁ¦µÄÔöÇ¿£¬UnicodeÒ²ÔÚÃæÊÀÒÔÀ´µÄÊ®¶àÄêÀïµÃµ½ÆÕ¼°¡££¨ÉùÃ÷£ºUnicode±àÂ붨ÒåÀ´×Ô»¥ÁªÍø£©¡£
2¡¢»ñÈ¡native2ascii£º°²×°ÁËjdkºó£¬¼ÙÈçÄãÊÇÔÚwindowsÉÏ°²×°£¬ÄÇôÔÚjdkµÄ°²×°Ä¿Â¼Ï£¬»áÓÐÒ»¸öbinĿ¼£¬ÆäÖÐnative2ascii.exeÕýÊÇ¡£
3¡¢native2asciiµÄÃüÁîÐеÄÃüÃû¸ñʽ£º
native2ascii -[options] [inputfile [outputfile]]
˵Ã÷£º
-[options]£º±íʾÃüÁ¹Ø£¬ÓÐÁ½¸öÑ¡Ïî¿É¹©Ñ¡Ôñ
-reverse£º½«Unicode±àÂëתΪ±¾µØ»òÕßÖ¸¶¨±àÂ룬²»Ö¸¶¨±àÂëÇé¿öÏ£¬½«×ªÎª±¾µØ±àÂë¡£
-encoding encoding_name£º×ª»»ÎªÖ¸¶¨±àÂ룬encoding_nameΪ±àÂëÃû³Æ¡£
[inputfile [outputfile]]
inputfile£º±íʾÊäÈëÎļþÈ«Ãû¡£
outputfile£ºÊä³öÎļþÃû¡£Èç¹ûȱÉٴ˲


Ïà¹ØÎĵµ£º

¼òµ¥µÄjavaͼƬËõ·Å´úÂë

/**
* @param source: source image file
* @param output: output image file
* @param mode: 0 ratio,1 maxWidth,2 maxHeight,3 maxSide
* @param maxSide: maxWidth, maxHeight or maxSide, different by mode
* @param ratio: ratio if resized by ratio
*/
public static void resizeImage(File ......

ÔÚJavaÖе÷ÓÃC++

ÔÚjavaÖе÷ÓÃ×Ô¼ºµÄc++´úÂëÊÇÒ»¼þ¼òµ¥µÄÊÂÇ飬ÒÔÏÂÀàΪÀý£º
class Prompt {
  private native String getLine(String prompt);
  public static void main(String args[]) {
    Prompt p = new Prompt();
    String input = p.getLine("Type a line: ");
  &nbs ......

JavaÖÐnative¹Ø¼ü×ÖÓ÷¨

      ÔÚͨ¶ÁjdkÔ´´úÂëµÄʱºò·¢ÏÖÐí¶àjava·½·¨Ç°¶¼ÓÐnative¹Ø¼ü×ÖÐÞÊΣ¬×îºóµÃÖªnativeÊÇÓëC++ÁªºÏ¿ª·¢µÄʱºòÓõģ¬java×Ô¼º¿ª·¢²»Óá£
      ʹÓÃnative¹Ø¼ü×Ö˵Ã÷Õâ¸ö·½·¨ÊÇÔ­Éúº¯Êý£¬Ò²¾ÍÊÇÕâ¸ö·½·¨ÊÇÓÃC/C++ÓïÑÔʵÏֵģ¬²¢ÇÒ±»±àÒë³ÉÁËDLL£¬ÓÉjavaÈ¥µ÷Óá£ÕâЩº¯Êý ......

¡¾×ª¡¿ÈçºÎÔÚJavaÖбÜÃâequals·½·¨µÄÒþ²ØÏÝÚå

ÒëÕß×¢ :Äã¿ÉÄÜ»á¾õµÃJavaºÜ¼òµ¥£¬ObjectµÄequalsʵÏÖÒ²»á·Ç³£¼òµ¥£¬µ«ÊÇÊÂʵ²¢²»ÊÇÄãÏëÏóµÄÕâÑù£¬ÄÍÐĵĶÁÍê±¾ÎÄ£¬Äã»á·¢ÏÖÄã¶ÔJavaÁ˽âµÄÊÇÈç´ËµÄÉÙ¡£Èç¹ûÕâƪÎÄÕÂÊÇÒ»·ÝJava³ÌÐòÔ±µÄÈëÖ°±ÊÊÔ£¬ÄÇô²»ÖªµÀÓжàÉÙÈË»áµôÂäµ½ÕâÑùµÄÏÝÚåÖС£Ô­ÎÄת×Ôhttp://www.artima.com/lejava/articles/equality.html Èýλ×÷Õ߶¼ÊDz»Í¬Áì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ