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

Belgian number not recognized #32

Open
JWLB-IT opened this issue Jul 28, 2019 · 7 comments
Open

Belgian number not recognized #32

JWLB-IT opened this issue Jul 28, 2019 · 7 comments

Comments

@JWLB-IT
Copy link

JWLB-IT commented Jul 28, 2019

Hi,
I found out that a number starting with 0456 / XX XX XX is not recognized as a valid Belgian phone number.
I did the test on the Java version demo and there it's accepted and I could even see the provider.

Is this possible to fix this in a new version?
I currently use version 8.10.15.
A list of possible Belgian numbers is listed on this website: https://en.wikipedia.org/wiki/Telephone_numbers_in_Belgium

Thanks
Jo

@jimbo8098
Copy link

Hi Jo,

I'll look into this and report back.

@jimbo8098
Copy link

jimbo8098 commented Sep 26, 2019

I ran the following and got what I would expect back:

        static void Main(string[] args)
        {
            Console.WriteLine("Phone Number Tester");
            var numList = new List<string>()
            {
                "+32 0456 12 34 56",
                "+32 04 56 123 456",
                "+32 0456 12 34 56",
                "+320456123456",
                "+320456 12 34 56",
                "0456 12 34 56",
                "0456123456"
            };

            var inst = PhoneNumbers.PhoneNumberUtil.GetInstance();
            foreach (var num in numList)
            {
                Console.WriteLine($"I[{num}]: {ParseInternational(inst,num)}");
                Console.WriteLine($"N[{num}]: {ParseNational(inst,num)}");
            }
            Console.ReadLine();
        }

The two function calls simply provide or don't provide the country code as a default and enclose it in a try-catch.

When ran, I received the following:

image

Could you send the code you used to parse the number and the number in it's particular format? I don't suppose the other digits will matter but we'll probably figure that out.

@JWLB-IT
Copy link
Author

JWLB-IT commented Sep 27, 2019 via email

@JWLB-IT
Copy link
Author

JWLB-IT commented Oct 27, 2019

Hi,
I managed to strip the project which reproduces the bug.
A small document describes a walkthrough to get to it.
Download

Good luck

@JWLB-IT
Copy link
Author

JWLB-IT commented Dec 9, 2019

The download was no longer available.
Here is a new link download

@yildirimmehdi
Copy link

The download was no longer available.
Here is a new link download

Hello, the links you shared seem to be broken. Could you please share the walkthrough with a new link? I am having the same issue with Belgian numbers.

@JWLB-IT
Copy link
Author

JWLB-IT commented Aug 28, 2021 via email

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

3 participants