ORCID / ORCID-Source

ORCID Open Source Project
https://orcid.org
Other
407 stars 148 forks source link

Invalid characters for names and given names #6188

Open RealityMistic opened 3 years ago

RealityMistic commented 3 years ago

Good day!

We are the ministry of Science of Spain and we have an issue while integrating one of our applications with the ORCID Public API. Apparently, in our data, one of the researchers used parenthesis (Nickname) to indicate a nickname and while crossing the data with the ORCID API we got a HTTP 500 Server error.

We really don't want that to happen again, so we are filtering our data to remove parentheses, but we would like to include ALL INVALID CHARACTERS to filter in our function. Can someone provide such a list?

Thanks a lot for the wonderful job at ORCID!

iamanshulgit commented 3 years ago

Good day!

We are the ministry of Science of Spain and we have an issue while integrating one of our applications with the ORCID Public API. Apparently, in our data, one of the researchers used parenthesis (Nickname) to indicate a nickname and while crossing the data with the ORCID API we got a HTTP 500 Server error.

We really don't want that to happen again, so we are filtering our data to remove parentheses, but we would like to include ALL INVALID CHARACTERS to filter in our function. Can someone provide such a list?

Thanks a lot for the wonderful job at ORCID!

Hello @drachodan, I am glad that I am here to give my sample code for all special characters. Below I am going to leave a code to generate the list of all special characters. Please consider the code and I hope it may help you. If you feel you can clone the whole ### package from my Github account under the name "specialCharacter". ############################################################################################# Solution: //solution: List all the special characters from the ASCII value to a string value. int min = 0, max =128; //ASCII value ranges from 0-127 List sol = new ArrayList();
for(int i = min; i < max ; i++) { char value = (char)i; //storing ASCII value to char sol.add(Character.toString(value).replaceAll("[a-zA-Z0-9]", "")); //storing into the list of string using regex which remove alphanumeric character. System.out.print(value); //checking out the all ASCII values } System.out.println(); for(String temp : sol) System.out.print(temp); //checking out the list of all special characters. #############################################################################################

TomDemeranville commented 1 year ago

Hi could you provide the affected ORCID ID so we can investigate? Apologies for the late response!