wip: Fix Reline ASCII-8BIT <-> UTF-8 issues #19524
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.
This PR is trying to fix some of the Reline issues I have introduced as part of: #19397
This PR changes the main msfconsole prompt to provide input and output as UTF-8-encoded strings by providing UTF-8 wrappers around some of our commonly used IO classes.
It seems like these changes could have a wide impact than I initially anticipated as it begins to introduce ASCII-8BIT <-> UTF-8 encoding issues both ways. I will keep testing and addressing any edge cases I come across.
Affected issues:
I am currently fixing the tests.Tests should now pass.Verification
touch メタスプロイトが大好きです
echo 'hello world!' > メタスプロイトが大好きです
msfconsole
Verify you can call off to the local filesystem with autocompletion:This did not work previously with Readline as we do not have a Filesystem dispatcher in the stack which implementscat メタスプ<TAB>
def_cat_tabs
when trying to auto-complete local filenames.cat メタスプ<TAB>
which should result incat メタスプロイトが大好きです