当前位置: 首页 > news >正文

电子商务网站建设论文wordpress搭建个人店铺

电子商务网站建设论文,wordpress搭建个人店铺,内网建站工具,网站搜索引擎优化方案文章目录 字符编码问题编码转换问题ANSI转UnicodeUnicode转ANSIUtf8转 ANSIutf8 转UnicodeANSI 转UTF-8Unicode 转 UTF-8 全部代码 字符编码问题 Windows API 函数 MessageBoxA:MessageBox 内部实现#xff0c;字符串编码(ANSI)转换成了Unicode,在调用MessageboxW MessageBox:… 文章目录 字符编码问题编码转换问题ANSI转UnicodeUnicode转ANSIUtf8转 ANSIutf8 转UnicodeANSI 转UTF-8Unicode 转 UTF-8 全部代码 字符编码问题 Windows API 函数 MessageBoxA:MessageBox 内部实现字符串编码(ANSI)转换成了Unicode,在调用MessageboxW MessageBox:是一个宏定义 MessageBoxA(NULL,Hello,提示,MB_OK); MessageBoxW(NULL,LHello,L提示,MB_OK);编码转换问题 ANSI转Unicode //ANSI转Unicode wchar_t* CCharset::AnsiToUnicode(const char* str) {if (m_wstr)//安全{delete m_wstr;m_wstr NULL;}DWORD dwSize::MultiByteToWideChar(CP_ACP,0,str,-1,NULL,0);//求宽字符的大小m_wstr new wchar_t[dwSize];::MultiByteToWideChar(CP_ACP, 0, str, -1, m_wstr, dwSize);return m_wstr; }Unicode转ANSI //Unicode转ANSI char * CCharset::UnicodeToAnsi(const wchar_t * wstr) {if (m_str){delete m_str;m_str NULL;}DWORD dwSizeWideCharToMultiByte(CP_ACP, 0, wstr, -1,NULL,0,NULL,NULL);m_str new char[dwSize];::WideCharToMultiByte(CP_ACP, 0, wstr, -1, m_str, dwSize, NULL, NULL);return m_str; }Utf8转 ANSI char * CCharset::Utf8ToAnsi(const char * str) {if (m_wstr){delete[] m_wstr;m_wstr NULL;}if (m_str){delete[] m_str;m_str NULL;}//UTF-8 转Unicodem_wstr Utf8ToUnicode(str);//Unicode 转ANSIm_str UnicodeToAnsi(m_wstr);return m_str; }utf8 转Unicode wchar_t* CCharset::Utf8ToUnicode(const char * str) {if (m_wstr){delete m_wstr;m_wstr NULL;}DWORD dwSizeMultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);m_wstr new wchar_t[dwSize];memset(m_wstr, 0, dwSize*sizeof(wchar_t));//清空内存MultiByteToWideChar(CP_UTF8, 0, str, -1, m_wstr, dwSize);return m_wstr; }ANSI 转UTF-8 char* CCharset::AnsitoUtf8(const char* str) {if (m_wstr){delete[] m_wstr;m_wstr NULL;}if (m_utf8){delete[] m_utf8;m_utf8 NULL;}//Ansi 转Unicodem_wstr AnsiToUnicode(str);//Unicode 转UTF-8m_utf8UnicodeToUtf8(m_wstr);return m_utf8; }Unicode 转 UTF-8 char * CCharset::UnicodeToUtf8(const wchar_t * wstr) {if (m_utf8){delete[] m_utf8;m_utf8 NULL;}DWORD dwSizeWideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);m_utf8 new char[dwSize];memset(m_utf8,0,dwSize);//清空内存WideCharToMultiByte(CP_UTF8, 0, wstr, -1, m_utf8, dwSize, NULL, NULL);return m_utf8; }全部代码 CCharset.h #pragma once class CCharset {private:wchar_t* m_wstr;char* m_str;char* m_utf8; public:CCharset();~CCharset();//ANSI转Unicodewchar_t* AnsiToUnicode(const char* str);//Unicode转ANSIchar* UnicodeToAnsi(const wchar_t* wstr);//UTF8 转ANSIchar* Utf8ToAnsi(const char* str);//ANSI转UTF - 8char* AnsitoUtf8(const char* str);//Unicode 转 UTF-8char* UnicodeToUtf8(const wchar_t* wstr);//UTF-8转Unicodewchar_t* Utf8ToUnicode(const char* str);};CCharset.cpp #include pch.h #include CCharset.hCCharset::CCharset() {m_wstr NULL;m_str NULL;m_utf8 NULL; }CCharset::~CCharset() {if (m_wstr){delete m_wstr;m_wstr NULL;}if (m_str){delete m_str;m_str NULL;}if (m_utf8){delete[] m_utf8;m_utf8 NULL;} }//ANSI转Unicode wchar_t* CCharset::AnsiToUnicode(const char* str) {if (m_wstr)//安全{delete[] m_wstr;m_wstr NULL;}DWORD dwSize::MultiByteToWideChar(CP_ACP,0,str,-1,NULL,0);//求宽字符的大小m_wstr new wchar_t[dwSize];::MultiByteToWideChar(CP_ACP, 0, str, -1, m_wstr, dwSize);return m_wstr; }//Unicode转ANSI char * CCharset::UnicodeToAnsi(const wchar_t * wstr) {if (m_str){delete[] m_str;m_str NULL;}DWORD dwSizeWideCharToMultiByte(CP_ACP, 0, wstr, -1,NULL,0,NULL,NULL);//求字符的大小m_str new char[dwSize];::WideCharToMultiByte(CP_ACP, 0, wstr, -1, m_str, dwSize, NULL, NULL);return m_str; }char * CCharset::Utf8ToAnsi(const char * str) {if (m_wstr){delete[] m_wstr;m_wstr NULL;}if (m_str){delete[] m_str;m_str NULL;}//UTF-8 转Unicodem_wstr Utf8ToUnicode(str);//Unicode 转ANSIm_str UnicodeToAnsi(m_wstr);return m_str; }char* CCharset::AnsitoUtf8(const char* str) {if (m_wstr){delete[] m_wstr;m_wstr NULL;}if (m_utf8){delete[] m_utf8;m_utf8 NULL;}//Ansi 转Unicodem_wstr AnsiToUnicode(str);//Unicode 转UTF-8m_utf8UnicodeToUtf8(m_wstr);return m_utf8; }//Unicode 转 UTF-8 char * CCharset::UnicodeToUtf8(const wchar_t * wstr) {if (m_utf8){delete[] m_utf8;m_utf8 NULL;}DWORD dwSizeWideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);m_utf8 new char[dwSize];memset(m_utf8,0,dwSize);//清空内存WideCharToMultiByte(CP_UTF8, 0, wstr, -1, m_utf8, dwSize, NULL, NULL);return m_utf8; }//utf8 转Unicode wchar_t* CCharset::Utf8ToUnicode(const char * str) {if (m_wstr){delete m_wstr;m_wstr NULL;}DWORD dwSizeMultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);m_wstr new wchar_t[dwSize];memset(m_wstr, 0, dwSize*sizeof(wchar_t));//清空内存MultiByteToWideChar(CP_UTF8, 0, str, -1, m_wstr, dwSize);return m_wstr; }
http://www.w-s-a.com/news/701763/

相关文章:

  • 网站logo提交学网站开发技术
  • 跨境电商平台网站建设广州西安官网seo推广
  • 我和你99谁做的网站小程序制作第三方平台
  • 建设银行网站用户名鹤岗网站seo
  • 做一元夺宝网站需要什么条件西安市做网站的公司
  • 零基础建设网站教程郑州做网站推广价格
  • 平面设计免费素材网站新开三端互通传奇网站
  • ppt模板免费下载 素材医疗seo网站优化推广怎么样
  • 课程网站怎么做wordpress文章改背景色
  • 网络营销从网站建设开始卖汽车配件怎么做网站
  • 手机商城网站制作公司济南想建设网站
  • .net 建网站网站网站做员工犯法吗
  • 电子商务网站建设说课稿棕色网站设计
  • 怎么做律所的官方网站红塔网站制作
  • 装一网装修平台官网惠州seo按天付费
  • 湖南建设监理报名网站东莞模块网站建设方案
  • 网站建设小组个人主页html源码
  • 响应式网站检测工具营销公司业务范围
  • 网站源码如何安装做游戏课程网站
  • 选服务好的网站建设亚洲砖码砖专区2022
  • 网站快速查找wordpress 悬停 图片 文字
  • 网站续费 多久想自己做网站该学些什么
  • 可以自己做网站wordpress英文写作插件
  • 国外可以做会员网站的网站怎么查百度竞价关键词价格
  • 新站网站建设亚马逊关键词
  • 电商网站前端架构设计上海市建设工程安全生产协会网站
  • 东莞企业免费模版网站建设一般网站维护要多久
  • 著名建筑设计网站常州制作网站价格
  • 食品营销型网站广东省广州市白云区
  • 如何做网站哪个站推广描述对于营销型网站建设很重要飘红效果更佳