replace path placeholder stored as wide string #4307
Closed
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.
Fix for #4298.
I made a patch for conda/core/portability.py. I don't know if anything else should be changed (conda-build?). I tested it only on one example, so it's not much tested.
Doing binary_replace() in three variants may affect performance - no idea how
much.
The path placeholder may be stored in binaries in different encodings.
This change adds support for UTF16 or UTF32 to the already supported
UTF8 encoding. It should cover wchar_t and wxString (from wxWidgets
library).
Apparently the placeholder was not substituted on Windows,
and this has not changed. I only moved the call to
replace_pyzzer_entry_point_shebang() out of binary_replace()
to avoid calling it more than once.
Removed has_pyzzer_entry_point() - it was redundant as the same check
is done inside of replace_pyzzer_entry_point_shebang().