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

ÔÚLinux C±à³ÌÖÐʹÓÃUnicodeºÍUTF 8

Ä¿Ç°¸÷ÖÖLinux·¢Ðа涼֧³ÖUTF-8±àÂ룬µ±Ç°ÏµÍ³µÄÓïÑÔºÍ×Ö·û±àÂëÉèÖñ£´æÔÚһЩ»·¾³±äÁ¿ÖУ¬¿ÉÒÔͨ¹ýlocaleÃüÁî²é¿´£º
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
³£Óúº×ÖÒ²¶¼Î»ÓÚBMPÖУ¬ËùÒÔÒ»¸öºº×ֵĴ洢ͨ³£Õ¼3¸ö×Ö½Ú¡£ÀýÈç±à¼­Ò»¸öC³ÌÐò£º
#include <stdio.h>
int main(void)
{
printf("ÄãºÃ\n");
return 0;
}
Ô´ÎļþÊÇÒÔUTF-8±àÂë´æ´¢µÄ£º
$ od -tc nihao.c
0000000 # i n c l u d e < s t d i o .
0000020 h > \n \n i n t m a i n ( v o i
0000040 d ) \n { \n \t p r i n t f ( " 344 275
0000060 240 345 245 275 \ n " ) ; \n \t r e t u r
0000100 n 0 ; \n } \n
0000107
ÆäÖа˽øÖƵÄ344 375 240£¨Ê®Áù½øÖÆe4 bd a0£©¾ÍÊÇ“Ä㔵ÄUTF-8±àÂ룬°Ë½øÖƵÄ345 245 275£¨Ê®Áù½øÖÆe5 a5 bd£©¾ÍÊÇ“ºÃ”¡£°ÑËü±àÒë³ÉÄ¿±êÎļþ£¬"ÄãºÃ\n"Õâ¸ö×Ö·û´®¾Í³ÉÁËÕâÑùÒ»´®×Ö½Ú£ºe4 bd a0 e5 a5 bd 0a 00£¬ºº×ÖÔÚÆäÖÐÈÔÈ»ÊÇUTF-8±àÂëµÄ£¬Ò»¸öºº×ÖÕ¼3¸ö×Ö½Ú£¬ÕâÖÖ×Ö·ûÔÚCÓïÑÔÖгÆΪ¶à×Ö½Ú×Ö·û£¨Multibyte Character£©¡£ÔËÐÐÕâ¸ö³ÌÐòÏ൱ÓÚ°ÑÕâÒ»´®×Ö½Úwriteµ½µ±Ç°Öն˵ÄÉ豸Îļþ¡£Èç¹ûµ±Ç°Öն˵ÄÇý¶¯³ÌÐòÄܹ»Ê¶±ðUTF-8±àÂë¾ÍÄÜ´òÓ¡³öºº×Ö£¬Èç¹ûµ±Ç°Öն˵ÄÇý¶¯³ÌÐò²»ÄÜʶ±ðUTF-8±àÂ루±ÈÈçÒ»°ãµÄ×Ö·ûÖնˣ©¾Í´òÓ¡²»³öºº×Ö¡£Ò²¾ÍÊÇ˵£¬ÏñÕâÖÖ³ÌÐò£¬Ê¶±ðºº×ֵŤ×÷¼È²»ÊÇÓÉC±àÒëÆ÷×öµÄÒ²²»ÊÇÓÉlibc×öµÄ£¬C±àÒëÆ÷Ô­·â²»¶¯µØ°ÑÔ´ÎļþÖеÄUTF-8±àÂ븴ÖƵ½Ä¿±êÎļþÖУ¬libcÖ»Êǵ±×÷ÒÔ0½áβµÄ×Ö·û´®Ô­·â²»¶¯µØwrite¸øÄںˣ¬Ê¶±ðºº×ֵŤ×÷ÊÇÓÉÖն˵ÄÇý¶¯³ÌÐò×öµÄ¡£
µ«ÊǽöÓÐÕâÖ̶ֳȵĺº×ÖÖ§³ÖÊDz»¹»µÄ£¬ÓÐʱºòÎÒÃÇÐèÒªÔÚC³ÌÐòÖвÙ×÷×Ö·û´®ÀïµÄ×Ö·û£¬±ÈÈçÇó×Ö·û´®"ÄãºÃ\n"ÖÐÓм¸¸öºº×Ö»ò×Ö·û£¬ÓÃstrlen¾Í²»ÁéÁË£¬ÒòΪstrlenÖ»¿´½áβµÄ0×Ö½Ú¶ø²»¹Ü×Ö·û´®Àï´æµÄÊÇʲô£¬Çó³öÀ´µÄÊÇ×Ö½ÚÊý7¡£ÎªÁËÔÚ³ÌÐòÖвÙ×÷Unicode×Ö·û£¬CÓïÑÔ¶¨ÒåÁË¿í×Ö·û


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

LinuxϵÄOracle 10g°²×°¼°ÅäÖÃ

Ò».×ÊÔ´ÐèÒª£º
ÖÁÉÙ1024 MBÎïÀíÄÚ´æ
1024£­2048 Ðè1.5±¶µÄ½»»¥¿Õ¼ä
2048£­8192 Ðè1±¶µÄ½»»¥¿Õ¼ä
8192£­ Ðè0.75±¶µÄ½»»¥¿Õ¼ä
ÖÁÉÙ400 MB /tmp ÁÙʱĿ¼¿Õ¼ä
oracleÈí¼þÐèÒª1.5 GB µ½ 3.5 GB ´ÅÅÌ¿Õ¼ä
ĬÈÏÊý¾Ý¿âÐèÒª1.2 GB
¶þ.²é¿´ÏµÍ³×ÊÔ´Ïà¹ØÓï ......

ʹÓà Java ¶Ô Linux ÏÂÎļþ±àÂë¸ñʽ½øÐÐÅúÁ¿×ª»»

ʹÓà Java ¶Ô Linux ÏÂÎļþ±àÂë¸ñʽ½øÐÐÅúÁ¿×ª»»
        ²âÊÔʹÓÃ˵Ã÷£º
        1¡£½« ×Ö·û¼¯±àÂë¸ñʽΪ GB2312 µÄÎļþ test0.java£¬test1.java£¬test2.java ·ÅÔÚ /home/defonds/tmp/test Ŀ¼Ï£¨test0.java£¬test1.java£¬test2.java ×÷Õß¿ÉÒÔ ......

Linux²Ù×÷ϵͳϹØÓÚTopÃüÁîµÄ²ÎÊýÏê½â

TopÃüÁîÊÇLinuxϳ£ÓõÄÐÔÄÜ·ÖÎö¹¤¾ß£¬Äܹ»ÊµÊ±ÏÔʾϵͳÖи÷¸ö½ø³ÌµÄ×ÊÔ´Õ¼ÓÃ×´¿ö£¬ÀàËÆÓÚWindowsµÄÈÎÎñ¹ÜÀíÆ÷¡£ÏÂÃæÏêϸ½éÉÜËüµÄʹÓ÷½·¨¡£
top - 01:06:48 up  1:22,  1 user,  load average: 0.06, 0.60, 0.48
Tasks:  29 total,   1 running,  28 sleeping,   0 stopp ......

linuxÏÂÇý¶¯µÄÈë¿Úº¯Êý¼°¼ÓÔØ

      ¼¸ºõÿ¸ölinuxÇý¶¯¶¼Óиömodule_init¡£Ã»´í£¬Çý¶¯µÄ¼ÓÔؾͿ¿Ëü¡£ÏÈÀ´·ÖÎöÒ»ÏÂmodule_init¡£¶¨ÒåÈçÏ£º
#define module_init(x)     __initcall(x);              //include\linux\init.h
#define ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ