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

about international phone numbers #12

Open
fyears opened this issue Jan 21, 2015 · 0 comments
Open

about international phone numbers #12

fyears opened this issue Jan 21, 2015 · 0 comments

Comments

@fyears
Copy link

fyears commented Jan 21, 2015

Hi. I have some international messages, which are not exported correctly.

For example, a simple UK number should be +44 1234 123456, but your code just convert it into 1234123456, losing all the information about country code. For another example, a simple China number should be +86 123-1234-1234, and your code just convert it into 2312341234, which is even a invalid number, since even though you are allowed to omit the leading country code, the remaining leading 1 is necessary.

My suggestion is just removing strip(), trunc(), and format_phone() functions below. Or at least add a parameter like --keep-phone-number-as-is.

Original Line 129 - 158 in the code:

def strip(phone):
    #...
def trunc(phone):
    #...
def format_phone(phone):
    #...
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

1 participant