Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 native2ascii ¼òµ¥×ªÂë

native2ascii.exe ÊÇ Java µÄÒ»¸öÎļþתÂ빤¾ß£¬Êǽ«ÌØÊâ¸÷ÒìµÄÄÚÈÝ ×ªÎª ÓÃÖ¸¶¨µÄ±àÂë±ê×¼ÎÄÌåÐÎʽͳһµÄ±íÏÖ³öÀ´£¬Ëüͨ³£Î»ÓÚ JDK_home\bin Ŀ¼Ï£¬°²×°ºÃ Java SE ºó£¬¿ÉÔÚÃüÁîÐÐÖ±½ÓʹÓà native2ascii ÃüÁî½øÐÐתÂ룬ʾÀý£º
native2ascii -encoding 8859_1 c:\test.txt c:\temp.txt
½« test.txt ÎļþÄÚÈÝÓà 8859_1 × ......

JavaÇóÖ°¼òÀú

¸ö ÈË ¼ò Àú
ÐÕ    Ãû£º
ÍõÖ¾¹ú
ÐÔ    ±ð£º
ÄÐ
Äê    Á䣺
23Ëê
ÁªÏµµç»°£º
13124799190
ר    Òµ£º
¼ÆËã»ú¼¼Êõ
¹¤×÷ʱ¼ä£º
Ò»ÄêÒÔÉÏ
ѧ    Àú£º
´óר
ÓÊ    Ï䣺
andy478168@yeah.net
¡ï ÇóÖ°ÒâÏò
¹¤×÷ÐÔÖÊ ......

ÔÚ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³ÌÐòÔ±µÄ֪ʶ¼Ü¹¹Ç³Îö

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬
°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
Ò»¡¢Java±à³ÌÈëÃÅÀà
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄJava³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ