Subject: [sup-devel] turnsole cannot handle Japanese labels.

From: Horacio Sanson <[email-masked]>
Date: Mon, 25 Apr 2011 11:25:04 +0900

Any attempt to add a label with Japanese characters crashes the application. 
Seems this is a common problem to all Ruby 1.9 applications. I can see Rails 
had or has a lot of problems with this:

http://yehudakatz.com/2010/05/05/ruby-1-9-encodings-a-primer-and-the-solution-
for-rails/

https://rails.lighthouseapp.com/projects/8994/tickets/4683-ascii-8bit-and-
utf-8-in-hell

The backtrace I get follows:

/var/lib/gems/1.9.1/gems/console-0.3/lib/console/string.rb:27:in 
`display_width': "\xE3" from ASCII-8BIT to UTF-8 
(Encoding::UndefinedConversionError)
        from /var/lib/gems/1.9.1/gems/console-0.3/lib/console/string.rb:27:in 
`display_width'
        from /home/ryujin/Apps/turnsole/lib/turnsole/textfield.rb:129:in 
`handle_input'
        from /home/ryujin/Apps/turnsole/lib/turnsole/input.rb:108:in `ask'
        from /home/ryujin/Apps/turnsole/lib/turnsole/input.rb:141:in 
`ask_many_with_completions'
        from /home/ryujin/Apps/turnsole/lib/turnsole/input.rb:198:in 
`ask_for_labels'
        from /home/ryujin/Apps/turnsole/lib/turnsole/modes/thread-index-
mode.rb:585:in `block in edit_labels'
        from /home/ryujin/Apps/turnsole/lib/turnsole/input.rb:42:in `asking'
        from /home/ryujin/Apps/turnsole/lib/turnsole/modes/thread-index-
mode.rb:584:in `edit_labels'
        from /home/ryujin/Apps/turnsole/lib/turnsole/input.rb:92:in `handle'
        from /home/ryujin/Apps/turnsole/lib/turnsole/ui.rb:73:in `step'
        from bin/turnsole:134:in `<main>'

-- 
regards,                                                                                                                                                                                                       
Horacio Sanson
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: William Morgan <[email-masked]>
Date: Tue, 26 Apr 2011 04:47:53 +0000

> Any attempt to add a label with Japanese characters crashes the

Thanks for the bug report. This is a bit tricky. The problem is actually
that ncurses is giving me the characters one byte at a time. I'll see
what I can do to fix this.
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel