whisperfish / rust-phonenumber

Library for parsing, formatting and validating international phone numbers.
Apache License 2.0
163 stars 56 forks source link

[BUG] Proper E164 phone number parsed and formatted incorrectly when using wrong reference country #30

Open dabega opened 3 years ago

dabega commented 3 years ago

Behavior expected: obtaining same number when parsing (with any country) and formatting

Steps to reproduce: Parse international number with country other than country from the phone number

Tested with: Phone: +33142764978 Country: US Output after formatting to international format: +3342764978 Proper output: +33142764978

rustonaut commented 3 years ago

There is a format where country codes are not split maybe it got mixed up, I have to look into it.