Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling "00"? #7

Closed
aquarhead opened this issue Sep 27, 2013 · 4 comments
Closed

Error handling "00"? #7

aquarhead opened this issue Sep 27, 2013 · 4 comments

Comments

@aquarhead
Copy link

2.0.0p247 :001 > require 'rumoji'
 => true
2.0.0p247 :002 > Rumoji.encode("00")
 => ":zero:"

I think this is totally wrong! weird result when encoding a url http://bbs.zhibo8.cc/thread-1200214-1-1.html where 00 definitely shouldn't be encoded as :zero:..

@dddd1919
Copy link

dddd1919 commented Jan 9, 2014

Met that question like @aquarhead .
While encode number with double repeat, this happend.
Word like

00 11 22 33 44 55 66 77 88 99 00 ##

will be converted to emoji image like

:zero: :one: :two: ... :hash:

I just fork it and comment them out to aviod it

mwunsch added a commit that referenced this issue Jan 9, 2014
This is a fix for #7.
In addition to the updated iterator, I've adjusted the numeric emoji to
use accurate unicode codepoints.
@mwunsch
Copy link
Owner

mwunsch commented Jan 9, 2014

Fixed with the associated commit with a test for @dddd1919's use case.

irb(main):001:0> Rumoji.encode("00")
=> "00"

@mwunsch mwunsch closed this as completed Jan 9, 2014
@fuJiin
Copy link

fuJiin commented Jan 9, 2014

Just ran into this. Thanks for the fix!

@celsodantas
Copy link

the rubygem version 0.3.1 does not contain this fix.

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

No branches or pull requests

5 participants