Making changes to PhoneNumberMetadata.xml

115 views
Skip to first unread message

Alexander Koshel

unread,
Jan 17, 2018, 9:04:37 AM1/17/18
to libphonenumber-discuss
Hi guys!

Recently we've found one mistake in the parsing the german phone number for prefix in one area (3578). A mistake is most probably is in PhoneNumberMetadata.xml file, though in resources/geocoding/en/49.txt file it looks correct.

I've submitted a ticket to the project's Issue Tracker (https://issuetracker.google.com/issues/72082150), but got the status "Won't fix" because of "it's not an issue with the library".

So the question is: who is responsible for updating PhoneNumberMetadata.xml file? Should we submit a pull-request by ourselves?

David Beaumont

unread,
Jan 17, 2018, 9:17:43 AM1/17/18
to libphonenum...@googlegroups.com
The number you give is being recognized as valid. In the live demo we see:

Formatting Results
E164 format+4935783999121
Original format035783 999121
National format035783 999121
International format+49 35783 999121
Out-of-country format from US011 49 35783 999121
Out-of-country format from CH00 49 35783 999121

So is this about the formatting of the number?

Best regards,
    David

--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Beaumont :: Îñţérñåţîöñåļîžåţîờñ Libraries :: Google
Google Switzerland GmbH., Brandschenkestrasse 110, CH-8002, Zürich - Switzerland

Alexander Koshel

unread,
Jan 17, 2018, 9:25:32 AM1/17/18
to libphonenumber-discuss
Yes, the problem is with formatting and getting the area code. It should be 3578, but the library returns 35783.

David Beaumont

unread,
Jan 17, 2018, 10:15:20 AM1/17/18
to libphonenum...@googlegroups.com
Thanks for clarifying.

Please note that in some cases, for some regions, we choose to deliberately avoid representing all formatting at all levels of accuracy because of the way it increases the metadata size (and having smaller metadata is important for things like Android). This means it is not valid to assume that the "first group of digits" in a formatted number is always the "area code". In fact the library doesn't really promise to tell you anything about "area codes" since local dialling (without area codes) is not a use case that computers are ever likely to care about.

I'll make sure that your original issue is re-examined.

Best regards,
   David

To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-discuss+unsubscri...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
David Beaumont :: Îñţérñåţîöñåļîžåţîờñ Libraries :: Google
Google Switzerland GmbH., Brandschenkestrasse 110, CH-8002, Zürich - Switzerland

--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages