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

phpº¯ÊýÖв»ÖªµÀÔõôÔÚCÖе÷ÓÃ? htmlʵÌåÓëÍøÒ³±àÂë

mb_convert_encoding ("ÄãºÃ", "HTML-ENTITIES", "gb2312");    //Êä³ö£º你好
mb_convert_encoding ("你好", "gb2312", "HTML-ENTITIES");    //Êä³ö£ºÄãºÃ

ÉÏÃæÊÇphpº¯Êý,ÔÚc/c++ÖÐÔõôʵÏÖÕâÑù±àÂë?
20320ºÍ22909·Ö±ðÊÇ¡°Ä㡱¡°ºÃ¡±Õâ2¸ö×ÖµÄunicodeÂëÖµ¡£
ËùÒÔÕâô×ö¼´¿É£º
C/C++ code:

char* ConvertGBKToEncodeStr( const char* strGBK )
{

int len=MultiByteToWideChar(936, 0, strGBK, -1, NULL,0);
int i;
WCHAR * wszUCD = new WCHAR[len+1];
memset(wszUtf8, 0, len * 2 + 2);
MultiByteToWideChar(936, 0, strGBK, -1, wszUCD, len);
char *strEncode = new char[len*8+1];
for (i=0;i<wcslen(wszUCD); i++)
{
sprintf(strEncode+strlen(strEncode), "&#%d;", wczUCD[i]);
}
delete[] wszUCD;
return strEncode;


Õâ¸öÊÇ°Ñ"ÄãºÃ" תΪ&#20320;&#22909;
·´Ïò¸ü¼òµ¥£¬Ö±½ÓÌáÈ¡&#ºÍ;Ö®¼äµÄÊý×Ö£¬¸³¸øwchar_tÊý×é¼´¿É¡£

ÓÃiconv

phpº¯ÊýµÄÔ´Â룬¶¼ÊÇ´¿CµÄ£¬¿ÉÒԲο¼

#include <iomanip>
#include <iostream>
#include <string.h>
#include <iconv.h>
#include <locale.h>
#include <stdlib.h>
//#include <easycics>

#define HG_LA


Ïà¹ØÎÊ´ð£º

ѧϰÌÖÂÛ C/C++ QQȺ - C/C++ / ·Ç¼¼ÊõÇø

QQȺ 29152388
ÓÑÇéUP

°ï¶¥

up

°ïup

up Ö§³Ö£¡

up jf

...ÄѵÀÓзÖ..?

up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£

Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ

¼ÓÁË¡£

¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......

CÈí¼þ תÕý¹¤×ʶàÉÙºÏÊÊ£¿

µØµãÔÚÉîÛÚÄÏɽ
¡¡¡¡×öCÈí¼þ¡£ÊÔÓÃ2K£¬²»ÖªµÀתÕý¸ø¹«Ë¾Ì¸¶àÉÙºÏÊÊ°¡£¿
¡¡¡¡ÁíÍ⣬±¾ÈËС±¾£¬Ó¢ÓïÁù¼¶£¬ÊÔÓÃÈý¸öÔ±íÏÖµÃÒ²ËãÖÐÉÏˮƽ¡£µ«ÊÇÏÖÔÚ»¹²»ÄÜ×öÏîÄ¿¡£ÁíÍâ±ÏҵѧУûÓÐÃûÆø¡£
¡¡¡¡×ªÕý¸ø¹«Ë¾Ì¸¶àÉ ......

C ³ÌÐòÎÊÌâ (¶þ) - C/C++ / CÓïÑÔ

ÎÊһϣº
#include <stdio.h>
int main()
{
  char x, y, z;
  int i;
  int a[16];
  for(i=0; i<=16; i++)
  {
  a[i] = 0;
  ......

CÖеÄһЩСÎÊÌâ¡£¡£¡£

/* Note:Your choice is C IDE

×÷Ó㺠Ëæ»úÊý¼ÓÃÜ·¨£¬£¬£¬£¬
ÒÔÏÂÓÐÐí¶à²»¶®£¬Çë½Ìһϣ¬ÇëÖ÷Òâ´úÂë;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
c ......

C¡¢C++¡¢VC++ ¾«Æ·µç×ÓÊé·¢²¼À²£¡

ÄÚÈÝÉæ¼°£ºC¡¢C++¡¢STL¡¢VC++¡¢MFC¡¢COM¡¢ATL¡¢WindowsÍøÂç±à³Ì¡¢Êý¾Ý¿â±à³Ì¡¢WindowsÇý¶¯±à³Ì¡¢Èí¼þ¹¤³Ì¡¢Windows²Ù×÷ϵͳ±à³Ì£¬µÈµÈ·½Ãæ¡£

ÏÂÔصØÖ·£ºhttp://www.cctry.com/forumdisplay.php?fid=46

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ