Skip to content

Fix crash when function name is multibyte chracter#314

Merged
BlackIkeEagle merged 1 commit intovim-vdebug:masterfrom
haoling:master
Feb 10, 2018
Merged

Fix crash when function name is multibyte chracter#314
BlackIkeEagle merged 1 commit intovim-vdebug:masterfrom
haoling:master

Conversation

@haoling
Copy link
Copy Markdown
Contributor

@haoling haoling commented Dec 15, 2017

Crash vdebug when stacktrace includes multibyte character.
example: function test_これはテストです() { return true; }

With stack trace:

An error occured: <type 'exceptions.UnicodeEncodeError'>
Traceback (most recent call last):
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 31, in run
    self.runner.run()
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 189, in run
    self.refresh(res)
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 120, in refresh
    stack_res = self.update_stack()
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 346, in update_stack
    self.ui.stackwin.accept_renderer(renderer)
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/ui/vimui.py", line 377, in accept_renderer
    self.write(renderer.render())
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/ui/vimui.py", line 448, in write
    Window.write(self, msg, after="normal gg")
  File "/home/lamishina/.vim/bundle/vdebug/plugin/python/vdebug/ui/vimui.py", line 297, in write
    self.buffer[:] = str(msg).split('
')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 172-192: ordinal not in range(128)

This pull request is fix this.
I referenced #95.

And I am sorry, I am Japanese.
I cannot speak and write English well.

@BlackIkeEagle
Copy link
Copy Markdown
Member

@haoling could you verify this is no longer the case in v2-integration?

@BlackIkeEagle
Copy link
Copy Markdown
Member

Its seems to be ok in v2-integration, merging this as a fix for the final 1.x version

@BlackIkeEagle
Copy link
Copy Markdown
Member

thanks

@BlackIkeEagle BlackIkeEagle merged commit ae0609c into vim-vdebug:master Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants