zoukankan      html  css  js  c++  java
  • 代码goole一下贴上就用的下场NND

     1         int len;  
     2         len = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)P_Cstring, -1, NULL, 0, NULL, NULL);  
     3         szUtf8 = new char[len + 1];
     4         //memset(szUtf8, 0, len * 2 + 2); 问题出在这
     5         memset(szUtf8, 0, (len+1)*sizeof(char));
     6         WideCharToMultiByte (CP_UTF8, 0, (LPCWSTR)P_Cstring, -1, szUtf8, len, NULL,NULL);
     7         mysql_query( &mysql , szUtf8 );
     8         P_Cstring.Empty();
     9         delete[] szUtf8;
    10         szUtf8 = NULL;

    用VC insert数据到mysql要把语句转成UTF-8于是GOOGLE~贴上直接开跑~测试了几次OK~连续插入一多就挂了,代码要审核啊...... 天都快亮了,我日,看来人还是不能太懒.....

  • 相关阅读:
    hiveserver2 with kerberos authentication
    python Basic usage
    python Quicksort demo
    Python HeapSort
    mrunit for wordcount demo
    CCDH证书
    Hadoop question list
    Hadoop Yarn core concepts
    Hadoop Resource
    Hadoop could not find or load main class
  • 原文地址:https://www.cnblogs.com/abinxm/p/1939777.html
Copyright © 2011-2022 走看看