Skip to content

Commit

Permalink
Merge pull request #1068 from Shougo/revert-1047-msgpack-remove_encod…
Browse files Browse the repository at this point in the history
…ing_opt

Revert "Remove `encoding` and `unicode_errors` option from Packer and Unpacker"
  • Loading branch information
Shougo authored Feb 18, 2020
2 parents fb02471 + 173bb30 commit e897e01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rplugin/python3/deoplete/child.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ def __init__(self, vim: Nvim) -> None:
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:
Expand Down
5 changes: 4 additions & 1 deletion rplugin/python3/deoplete/parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ def _start_process(self) -> None:
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] = []

Expand Down

0 comments on commit e897e01

Please sign in to comment.