You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Japanese use 3 types of charcters, Hiragana, Katakana, Kanji(Chinese Chars) and it works on Hiragana & Katakana.
But on Kanji, I got errors as follows;
irb(main):024:0> '一'.display_size
ArgumentError: ArgumentError
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:36:in line' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:42:incodepoint'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:65:in block in display_width' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:ineach'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:in inject' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:indisplay_width'
from (irb):24
from /opt/local/bin/irb:12:in `
Hi janlelis,
Great work!
Japanese use 3 types of charcters, Hiragana, Katakana, Kanji(Chinese Chars) and it works on Hiragana & Katakana.
'But on Kanji, I got errors as follows;
irb(main):024:0> '一'.display_size
ArgumentError: ArgumentError
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:36:in
line' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:42:in
codepoint'from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:65:in
block in display_width' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:in
each'from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:in
inject' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/unicode-display_width-0.1.0/lib/unicode/display_width.rb:64:in
display_width'from (irb):24
from /opt/local/bin/irb:12:in `
'一' represent 'One' in Kanji.
irb(main):025:0> '一'.unpack('U*')
=> [19968]
irb(main):026:0> Unicode::DisplayWidth.offsets[19968]
=> nil
Other Kanji chars might get same results.
Any way, you do great work.
melborne
The text was updated successfully, but these errors were encountered: