摘要: 为了支持C++ UrlEncode之后的字符串能够被C#所识别(windows phone 下C#只能支持UTF8与 Unicode)。所谓的 UTF8 UrlEncode 也只是宽字符串 UrlEncode,网上找的,改了小部分,贴上代码吧。#include "UrlEncode.h"#include #include #include using namespace std;namespace ConnectSDK{ namespace Utility { const wchar_t * hexenc[] = { L"%00", L"%01 阅读全文
posted @ 2014-04-04 19:12 newcj 阅读(5390) 评论(2) 推荐(0) 编辑
摘要: 由于项目原因,需要引入C++。wstring 与 string 的互转研究了一段时间,坑主要在于使用下面这种方式进行转换,中文会乱码wstring ws = L"这是一段测试文字";string s;s.assign(ws.begin(), ws.end());因此采用了下面的方法将wstring 转为 string wstring wstr = L"这是一段测试文字"; string str; int wstr_len = wstr.length(); int str_len = wstr_len * s... 阅读全文
posted @ 2014-04-04 19:05 newcj 阅读(1183) 评论(0) 推荐(0) 编辑
摘要: 已经快接近三年没有更新博客了,最近打算把博客这块从新建设起来。 由于工作原因,现在已经很久没有接触过Android了。目前工作是全力 Windows Phone,并且也已经工作一年半了,以后会陆续把之前Windows Phone 上遇到的一些技术问题记录下来。 阅读全文
posted @ 2014-04-04 18:51 newcj 阅读(226) 评论(0) 推荐(0) 编辑