diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2020-02-19 07:52:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 07:52:02 +0900 |
commit | 173bb308966865f75a725c927b7fbbccc80afbca (patch) | |
tree | 70eb6724deabdbaa53310b1cda8a2775790a2ba9 /rplugin | |
parent | fb024718013a961242a19f30aec3a846579c1f21 (diff) | |
download | deoplete.nvim-173bb308966865f75a725c927b7fbbccc80afbca.zip |
Revert "Remove `encoding` and `unicode_errors` option from Packer and Unpacker"
Diffstat (limited to 'rplugin')
-rw-r--r-- | rplugin/python3/deoplete/child.py | 5 | ||||
-rw-r--r-- | rplugin/python3/deoplete/parent.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/rplugin/python3/deoplete/child.py b/rplugin/python3/deoplete/child.py index 842755a..484a555 100644 --- a/rplugin/python3/deoplete/child.py +++ b/rplugin/python3/deoplete/child.py @@ -40,9 +40,12 @@ class Child(logger.LoggingMixin): self._source_errors: typing.Dict[str, int] = defaultdict(int) self._prev_results: typing.Dict[str, Result] = {} self._unpacker = msgpack.Unpacker( + encoding='utf-8', unicode_errors='surrogateescape') self._packer = msgpack.Packer( - use_bin_type=True) + use_bin_type=True, + encoding='utf-8', + unicode_errors='surrogateescape') self._ignore_sources: typing.List[typing.Any] = [] def main_loop(self, stdout: typing.Any) -> None: diff --git a/rplugin/python3/deoplete/parent.py b/rplugin/python3/deoplete/parent.py index 01f92e2..72438b8 100644 --- a/rplugin/python3/deoplete/parent.py +++ b/rplugin/python3/deoplete/parent.py @@ -118,8 +118,11 @@ class AsyncParent(_Parent): self._queue_out: Queue = Queue() # type: ignore self._queue_err: Queue = Queue() # type: ignore self._packer = msgpack.Packer( - use_bin_type=True) + use_bin_type=True, + encoding='utf-8', + unicode_errors='surrogateescape') self._unpacker = msgpack.Unpacker( + encoding='utf-8', unicode_errors='surrogateescape') self._prev_pos: typing.List[typing.Any] = [] |