cpprest with japanese character?

假装没事ソ 提交于 2019-12-25 00:07:31

问题


The following code:

auto nullValue = json::value::null();
std::string searchText = conversions::to_utf8string("michael");
make_request(client, methods::GET, nullValue, searchText);

Returns the json data:

{"data":[
  {
    "_id":172,"name":"Michael Edano","profile_picture":null
  }],
  "success":true
}

But if i put Japanese string:

auto nullValue = json::value::null();
std::string searchText = conversions::to_utf8string("北島 美奈");
make_request(client, methods::GET, nullValue, searchText);

The output is:

provided uri is invalid: /api/authenticate/searchStaffs/?? ??

But the expected output is:

{"data":[{"_id":12,"name":"北島 美奈","profile_picture":null}],"success":true}

What is the cause of this?

来源:https://stackoverflow.com/questions/50406621/cpprest-with-japanese-character

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!