mysqlÖÐgbkʲôÒâ˼
ÔÚ mysql ÖУ¬gbk ±àÂëÓÃÓÚ´æ´¢¼òÌåÖÐÎÄÊý¾Ý£¬½ÓÄÉË«×Ö½Ú×Ö·û¼¯ (dbcs)£¬Ö§³Ö 65536 ¸ö×Ö·û£¬°üÀ¨ÖÐÎÄ×Ö·û¡¢ascii ×Ö·ûºÍÌØÊâ·ûºÅ¡£
GBK±àÂëÔÚMySQLÖеļÄÒå
GBK£¨¼´Gu¨®BiaoKu¨®ji£¬¹ú±êÀ©Õ¹¿â£©ÊÇÒ»ÖÖ±»ÆÕ±éÓÃÓÚ¼òÌåÖÐÎÄÇéÐεÄ×Ö·û±àÂë±ê×¼¡£ÔÚMySQLÊý¾Ý¿âÖУ¬GBK×Ö·û¼¯ÓÃÓÚ´æ´¢ºÍ´¦Àí°üÀ¨¼òÌåÖÐÎÄÊý¾ÝµÄ×ֶΡ£
GBK±àÂë»ùÓÚDBCS£¨Ë«×Ö½Ú×Ö·û¼¯£©£¬ËüʹÓÃÁ½¸ö×Ö½ÚÀ´ÌåÏÖÒ»¸ö×Ö·û¡£GBKÖ§³Ö65536¸ö²î±ðµÄ×Ö·û£¬ÆäÖаüÀ¨ËùÓеÄÖÐÎÄ×Ö·û¡¢ASCII×Ö·ûºÍһЩÌØÊâµÄ·ûºÅ¡£
GBK×Ö·û¼¯µÄÓŵã
ÆÕ±éµÄÖÐÎÄÖ§³Ö£ºGBK±àÂ뺸ÇÁ˾ø´ó´ó¶¼¼òÌåÖÐÎÄ×Ö·û£¬Òò´Ë¿ÉÒÔÓÐÓõش洢ºÍ´¦ÀíÖÐÎÄÊý¾Ý¡£
¼æÈÝÐԺãºGBK×Ö·û¼¯ÔÚÖÐÎÄÇéÐÎÖб»ÆÕ±éʹÓã¬Òò´ËÓëÆäËûϵͳºÍÓ¦ÓóÌÐò¼æÈÝÐԽϺá£
×Ö½Ú³¤¶ÈÀο¿£ºGBK×Ö·û¼¯Ê¹ÓÃË«×Ö½ÚÀ´ÌåÏÖÿ¸ö×Ö·û£¬Òò´Ë×ֶεÄ×Ö½Ú³¤¶È¿ÉÒÔºÜÈÝÒ×µØÈ·¶¨¡£
GBK×Ö·û¼¯µÄÈõµã
²»Ö§³ÖUTF-8£ºGBK×Ö·û¼¯²»Ö§³Ö¶à×Ö½Ú±àÂë±ê×¼UTF-8£¬Òò´ËÔÚ´¦Àí¶àÓïÑÔÊý¾Ýʱ¿ÉÄÜ»áÓöµ½¼æÈÝÐÔÎÊÌâ¡£
¿Õ¼äЧÂʵͣºÓÉÓÚʹÓÃÁËË«×Ö½Ú±àÂ룬GBK×Ö·û¼¯´æ´¢ÖÐÎÄÊý¾Ýʱ¿Õ¼äЧÂʽϵͣ¬±ÈUTF-8Õ¼Óøü¶àµÄ´æ´¢¿Õ¼ä¡£
¼æÈÝÐÔÎÊÌ⣺GBK×Ö·û¼¯²»Êǹú¼Ê±ê×¼£¬Òò´ËÔÚ·ÇÖÐÎÄÇéÐÎÖпÉÄܱ£´æ¼æÈÝÐÔÎÊÌâ¡£
Ñ¡ÔñGBK×Ö·û¼¯µÄ×¢ÖØÊÂÏî
ÔÚÑ¡ÔñGBK×Ö·û¼¯Ê±£¬ÐèҪ˼Á¿ÒÔÏÂÒòËØ£º
Ó¦ÓóÌÐòµÄÓïÑÔÇéÐΣºÈôÊÇÓ¦ÓóÌÐòÖ÷Òª´¦Àí¼òÌåÖÐÎÄÊý¾Ý£¬ÔòGBK×Ö·û¼¯ÊÇÒ»¸ö²»´íµÄÑ¡Ôñ¡£
¼æÈÝÐÔÐèÇó£ºÈôÊÇÓ¦ÓóÌÐòÐèÒªÓëÆäËûϵͳ»òÓ¦ÓóÌÐò½»»¥£¬ÔòÐèҪ˼Á¿ËüÃǵÄ×Ö·û¼¯ÊÇ·ñÓëGBK¼æÈÝ¡£
´æ´¢¿Õ¼äÏÞÖÆ£ºÈôÊÇ´æ´¢¿Õ¼äÓÐÏÞ£¬ÔòӦ˼Á¿Ê¹ÓÃUTF-8×Ö·û¼¯£¬ÓÉÓÚËü¾ßÓиüºÃµÄ¿Õ¼äЧÂÊ¡£
ÒÔÉϾÍÊÇmysqlÖÐgbkʲôÒâ˼µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡