DavidePastore / codice-fiscale

A PHP library to calculate and check the italian tax code (codice fiscale).
GNU General Public License v2.0
100 stars 19 forks source link

Diacritic characters support in Fiscal Code Validation #63

Open EmilianoMaina opened 1 year ago

EmilianoMaina commented 1 year ago

Hello,

we are using the library to validate the Fiscal Code inserted by the user vs First Name and Last Name.

What Is the library behaviour in case of First/Last Name including diacritic characters that are not part of the transliteration table defined?

Some characters examples are å, ñ and ø.

Thanks.

PS the reference transliteration table is here https://dait.interno.gov.it/documenti/circolare-n-1-2008-0.pdf

DavidePastore commented 1 year ago

Hi @EmilianoMaina. Thanks for raising this issue. Unfortunately, we don't have a specific rule to apply when the first and last names contain those special characters, so the library simply ignores them. You can read more about it here: https://github.com/DavidePastore/codice-fiscale/pull/60 (there is an additional link).