-
Notifications
You must be signed in to change notification settings - Fork 19
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
Problems with non italian characters in name and surname #54
Comments
Hello @stratio84 . Thanks for using the library. Yes, I'm pretty sure this is a bug in the library. I'll take a look at it ASAP. |
Hello Davide, I performed some deeper checks and there's something strange. Basically if I use the customer data, that I wrote inside my previous post, to generate the fiscale code with your library I obtain the following fiscal code: BTNNNA72D42H501X Snippet of code I used is the following: $subject = new Subject(
This fiscal code is different from the one I obtained from an online generator website using the same customer data. So my first question is: which code is the right one for the given customer data? :) The second one (the one generated with your library) seems to be created after translitterating all the non italian characters into italian ones. Is this correct? I mean when a non italian people is assigned a fiscal code in Italy what happens if he/she has some "strange" characters inside his/her name? Are they translitterated first in order to generate the fiscal code? Thanks, Gianpiero. |
Hi @stratio84, yes, the fiscal code must be made up of latin characters only. You can read more about it here. The problem is that we need to find the way the character should be converted. You can see here that it's not correct to find the "Ñ" in the fiscal code. |
Hello Davide,
first of all thanks for your library, super useful :)
Doing some tests I think I found a bit of a problem.
If I try to validate this fiscal code:
BTENNA72D42H501M
which belongs to the following user:
Name: Anna
Surname: Betaña
Gender: Female
Date of birth: 02/04/1972
City of birth: Rome (H501)
Country of birth: Italy
the system is giving me an error stating that the fiscal code is not compatible with the user data.
This is the piece of code I'm using:
$subject = new \CodiceFiscale\Subject([
"name" => $firstname,
"surname" => $lastname,
"birthDate" => $birthday,
"gender" => $gender,
"belfioreCode" => $city
]);
From the log it seems that it's not handling well the spanish n character in the surname.
Am i doing something wrong here or is it a known issue with names and surnames containing characters belonging to different alphabets?
Thanks in advance for the help.
Gianpiero.
The text was updated successfully, but these errors were encountered: