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

Different results in FindNumbers with EC national numbers #261

Open
3 tasks done
mngobbi opened this issue Jul 26, 2024 · 2 comments
Open
3 tasks done

Different results in FindNumbers with EC national numbers #261

mngobbi opened this issue Jul 26, 2024 · 2 comments

Comments

@mngobbi
Copy link

mngobbi commented Jul 26, 2024

Context

image

Workaround

I instead of using FindNumbers("998039805", "EC") directly I do this instead:

var prefix = instance.GetCountryCodeForRegion(countryCode);

numbersFound = instance.FindNumbers(prefix + value, "EC");

I get the expected results...

I am missing something?

Thanks!

@mngobbi mngobbi changed the title Different results for FindNumbers with EC national number Different results than libphonenumber.appspot.com for FindNumbers with EC national numbers Jul 26, 2024
@mngobbi mngobbi changed the title Different results than libphonenumber.appspot.com for FindNumbers with EC national numbers Different results in FindNumbers with EC national numbers Jul 26, 2024
@twcclegg
Copy link
Owner

You did find some curious behavior, I'm not sure I'll be able to get to the bottom of it this weekend but I'll dig into it.

Also, thank you very much for filling out the issue template! I think you might be the first to do so in 2+ years.

@twcclegg
Copy link
Owner

It seems to be failing due to NationalPrefixOptionalWhenFormatting being false here: https://github.com/twcclegg/libphonenumber-csharp/blob/main/csharp/PhoneNumbers/PhoneNumberMatcher.cs#L654.
I'll need to remember how to spin up a project with the Java version to compare.

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

2 participants