gherkin: (C) Manually convert uri:s from char* to wchar_t*. #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Manually convert uri:s from
char*
towchar_t*
to work around the deficient implementation ofswprintf
on Alpine Linux 3.5 running in Docker. Fixes #165.Details
On Alpine Linux 3.5 running in Docker
swprintf
does not handle the format stringL"%hs"
properly and the written string becomes empty, therefore swprintf cannot be used to convert the uri:s passed as argument (aschar*
) to wide characters (wchar_t*
). To work around this the uri:s are converted manually character by character, taking into account that the uri is utf8 coded (which only make a difference if the uri contains non-ascii characters).How Has This Been Tested?
Tested on the Docker image, and on Ubuntu 16.04 (gcc and clang).
Types of changes
Checklist: