Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved string type parameters regarding character width #1230

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

jason-ha
Copy link
Contributor

update API string params to respect _UTF16_STRINGS and not assume setting matches _WIN32
break out base64, memory, and strings from asyncrt_utils.h

overriding _UTF16_STRINGS definition in basic_types.h allows full narrow string support for json component. All other APIs do as well, but build would break for some web implementation for WIN32 as conversion to wide for Windows APIs is not in place.

jason-ha and others added 13 commits July 19, 2019 11:15
 independent of UNICODE vs MBCS setting
Set CPPREST_FORCE_NARROW_STRINGS=ON to enable.

Simplistic cleanup throughout project is not possible as some Windows APIs require utf16 such as HTTPSPolicyCallbackData in http_client_winhttp.cpp.
HTTP related code is not completely updated so a full package may not be produced, though settings exist to have a clean build. Use:
 -DCPPREST_FORCE_NARROW_STRING=ON -DCPPREST_EXCLUDE_WEBSOCKETS=ON -DCPPREST_HTTP_LISTENER_IMPL=none -DBUILD_SAMPLES=OFF
…omponents like just json support

extractions from asyncrt_utils.h:
  base64_utils.h (to/form base64)
  memory_utils.h (details::make_unique)
  string_utils.cpp (string utils)

asyncrt_utils retains error, date-time, and nounce utils
@jason-ha jason-ha requested a review from BillyONeal February 14, 2020 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants