Skip to content

Number is normalized incorrectly in some cases #522

@IvanSelivanov

Description

@IvanSelivanov

There is a number of phone numbers in Tajikistan (all of them belong to Megafon company) that look like +992 88 ..., i. e. +992 88 123 4567. While normalizing, Phony splits the number in two parts, the country code and the national number, and then rejects '8' as it thinks it's a trunk code, but it isn't, which results in incorrect output

What I did

Phony.normalize('+992 88 123 4567')

What happened

=> "99281234567"

What I expected to happen and why

=> "992*8*81234567"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions