linux·ºÆðÂÒÂëÔõô°ì
linuxÖÐÂÒÂëÎÊÌâµÄȪԴÔÚÓÚ×Ö·û¼¯±àÂ벻ƥÅä¡£½â¾ö°ì·¨ÈçÏ£º¼ì²éÄ¿½ñ×Ö·û¼¯±àÂë¡£ÉèÖÃ׼ȷµÄ×Ö·û¼¯±àÂ룬°üÀ¨ÔÝʱºÍÓÀÊÀÉèÖá£ÖØÐÂÆô¶¯Ó¦ÓóÌÐò¡£Ë¼Á¿ÆäËû½â¾öÒªÁ죬Èç¼ì²éÎļþ±àÂ롢ʹÓÃutf-8±àÂë¡¢×°ÖÃÌض¨×ÖÌ塣ƾ֤ӦÓóÌÐòµÄ²î±ð£¬½ÓÄÉÌض¨½â¾öÒªÁ죬Èç¼ì²éÖÕ¶ËÄ£ÄâÆ÷ÉèÖᢵ÷½âÎı¾±à¼Æ÷ÉèÖûò¼ì²éä¯ÀÀÆ÷unicodeÖ§³ÖÇéÐΡ£
Linux ÂÒÂëÎÊÌâµÄ½â¾öÒªÁì
µ±ÔÚ Linux ϵͳÖÐÓöµ½ÂÒÂëÎÊÌâʱ£¬Ö÷ÒªÔµ¹ÊÔÓÉÊÇ×Ö·û¼¯±àÂ벻ƥÅä¡£½â¾ö´ËÎÊÌâµÄ°ì·¨ÈçÏ£º
1. ¼ì²éÄ¿½ñ×Ö·û¼¯±àÂë
ʹÓà locale ÏÂÁîÉó²éÄ¿½ñ×Ö·û¼¯±àÂ룺
$ locale
µÇ¼ºó¸´ÖÆ
2. ÉèÖÃ׼ȷµÄ×Ö·û¼¯±àÂë
ÔÝʱÐÞ¸Ä×Ö·û¼¯±àÂ룺ʹÓà export ÏÂÁÀýÈ磺
$ export LANG=en_US.UTF-8
µÇ¼ºó¸´ÖÆ
ÓÀÊÀÐÞ¸Ä×Ö·û¼¯±àÂ룺±à¼ /etc/locale.conf Îļþ£¬Ìí¼ÓÒÔÏÂÐУº
LANG=en_US.UTF-8
µÇ¼ºó¸´ÖÆ
3. ÖØÐÂÆô¶¯Ó¦ÓóÌÐò
ÒѾÔËÐеÄÓ¦ÓóÌÐò¿ÉÄܲ»»á×Ô¶¯Ó¦ÓÃ×Ö·û¼¯±àÂë¸ü¸Ä¡£¹Ø±Õ²¢ÖØÐÂÆô¶¯Ó¦ÓóÌÐò¡£
4. ÆäËû½â¾öÒªÁì
¼ì²éÎļþ±àÂ룺ʹÓà file ÏÂÁî¼ì²éÎļþ±àÂ룬²¢È·±£ÓëÓ¦ÓóÌÐò»ò¾ç±¾µÄ±àÂëÒ»Ö¡£
ʹÓà UTF-8 ±àÂ룺UTF-8 ÊÇ Linux Öн¨ÒéµÄͨÓñàÂ룬ÔÚ´ó´ó¶¼ÇéÐÎ϶¼¿ÉÒÔ½â¾öÂÒÂëÎÊÌâ¡£
×°ÖÃÏà¹ØµÄ×ÖÌ壺ijЩÓïÑÔ×Ö·ûÐèÒªÌض¨µÄ×ÖÌå²Å»ª×¼È·ÏÔʾ¡£×°ÖÃËùÐèµÄ×ÖÌ壬ÀýÈ磺
$ sudo apt install fonts-thai-sarabun # Ì©Óï $ sudo apt install fonts-devanagari-fonts # Ó¡µØÓï
µÇ¼ºó¸´ÖÆ
5. Õë¶ÔÌض¨Ó¦ÓóÌÐòµÄ½â¾öÒªÁì
ÖÕ¶ËÄ£ÄâÆ÷£º¼ì²éÖÕ¶ËÄ£ÄâÆ÷ÉèÖã¬È·±£×Ö·û¼¯±àÂëÓë Linux ϵͳһÖ¡£
Îı¾±à¼Æ÷£ºµ÷½âÎı¾±à¼Æ÷ÉèÖ㬽«×Ö·û¼¯±àÂëÉèÖÃΪ UTF-8¡£
ä¯ÀÀÆ÷£º¼ì²éä¯ÀÀÆ÷ÉèÖã¬È·±£Ö§³Ö Unicode ×Ö·û¡£
ÒÔÉϾÍÊÇlinux·ºÆðÂÒÂëÔõô°ìµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡