sunaku / wmiirc

Ruby configuration for WMII window manager
ISC License
82 stars 26 forks source link

Cyrillic characters in client titles make focus_client_menu and client_invite_menu to fail #44

Closed koiuo closed 11 years ago

koiuo commented 12 years ago

Steps to reproduce

  1. create client with cyrillic char in title (visit russian page via firefox, for example)
  2. invoke focus_client_menu action and choose client with cyrillic chat in its title to focus

Expected action

Actual action

sunaku commented 12 years ago

Since you're able to choose the Cyrillic titled client from the menu, we can narrow down the suspects to the wmiirc logic itself: the Cyrillic text that wimenu emits is probably not in the same encoding as the Cyrillic text that wmiirc supplied it. As a result, the wmiirc is not able to reverse-lookup the index of the chosen item.

koiuo commented 12 years ago

Yep, wmiirc logic is a suspect. There is a snippet of code in the control/action/focus.yaml

    focus_client_menu: |
      if client = client_menu('show client:', :client)
        client.focus
      end

I'm not familiar with yaml, but obviously, the problem is in the client_menu() method and value it produces.

Could you please suggest, where to dig for a solution?

sunaku commented 12 years ago

Yes, client_menu() is implemented in lib/wmiirc/menu.rb.

sunaku commented 11 years ago

Were you able to fix the problem @edio ?

koiuo commented 11 years ago

No, I wasn't, sorry. I tried but gave up quickly.

sunaku commented 11 years ago

Closing this issue because your pull request has been merged.