catamphetamine / libphonenumber-js

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
https://catamphetamine.gitlab.io/libphonenumber-js/
MIT License
2.79k stars 216 forks source link

Doesn't accept non-english keyboard #141

Closed abdifardin closed 7 years ago

abdifardin commented 7 years ago

Why you doesn't support non-english keyboard whilst the original libphonenumber library do.

Its really deal breaker.

catamphetamine commented 7 years ago

You mean letter phone numbers? Because I don't see any point in them.

catamphetamine commented 7 years ago

Or is your mobile phone number something like (213) BIG BOSS

abdifardin commented 7 years ago

Yes phone numbers

why? the package is about supporting multi-national phone numbers So you should expect to enter non-english uni-code in the input

like this

+٤٤٢٣٢٣٢٣٤

abdifardin commented 7 years ago

They are supporting this Please check this http://libphonenumber.appspot.com/

catamphetamine commented 7 years ago

чегооо

I don't see any value in numbers like +٤٤٢٣٢٣٢٣٤. What is that anyway. Some jewish word I guess. Can't they just use digits.

abdifardin commented 7 years ago

Its arabic characters dear +٤٤٣٤٥٦٧٨ = +44345678

catamphetamine commented 7 years ago

So in arabic countries they don't use "arabic digits"? So weird.

abdifardin commented 7 years ago

Its numbers, and many people use them when filling number inputs

catamphetamine commented 7 years ago

Ok, if you wish so. I'll add them. Are all phone numbers in Iraq written like that?

abdifardin commented 7 years ago
screen shot 2017-10-10 at 15 33 14
catamphetamine commented 7 years ago

Yeah yeah, whatever, I guess you're right, how am I supposed to know living in Russia https://en.wikipedia.org/wiki/Arabic_numerals

abdifardin commented 7 years ago

In Iraq , Iran, Saudia and many countries in Middle-east

I will appreciate it dear

abdifardin commented 7 years ago

Its not just about arabic unicodes I think you may need to include all numbers in all unicodes To make it really international package

I may could help if you want

catamphetamine commented 7 years ago

Yeah, sure, it shouldn't be fixed for just arabic then, it should be fixed for all of them. I'll investigate Google's code later today about that.

catamphetamine commented 7 years ago

This turned out to be a bug in react-phone-number-input and it has been fixed. See the updated demo there.

abdifardin commented 7 years ago

wow .. its working like a charm . Thanks for your update